forked from qt-creator/qt-creator
QmlJs Live preview: Fixed a bug that lead an object to be associated with 2 debug id.
If an object is created at the same location of another old object, It could be matched.
This commit is contained in:
@@ -118,7 +118,7 @@ void MapObjectWithDebugReference::processRecursive(const QDeclarativeDebugObject
|
||||
SourceLocation loc = ast->firstSourceLocation();
|
||||
if (object.source().columnNumber() == int(loc.startColumn)) {
|
||||
QString objectFileName = object.source().url().toLocalFile();
|
||||
if (object.source().lineNumber() == int(loc.startLine) && objectFileName == filename) {
|
||||
if (!doc && object.source().lineNumber() == int(loc.startLine) && objectFileName == filename) {
|
||||
result[ast] += object.debugId();
|
||||
} else if (doc && objectFileName.startsWith(filename + QLatin1Char('_') + QString::number(doc->editorRevision()) + QLatin1Char(':'))) {
|
||||
bool ok;
|
||||
|
||||
Reference in New Issue
Block a user