don't reset location marker if it would stay on the same line

This commit is contained in:
hjk
2009-09-17 16:51:03 +02:00
parent baf7003b61
commit eb6776e05e

View File

@@ -1092,10 +1092,16 @@ void DebuggerPlugin::gotoLocation(const StackFrame &frame, bool setMarker)
if (setMarker)
resetLocation();
} else {
TextEditor::BaseTextEditor::openEditorAt(frame.file, frame.line);
if (setMarker) {
resetLocation();
m_locationMark = new LocationMark(frame.file, frame.line);
static QString lastFile;
static int lastLine;
if (frame.line != lastLine || frame.file != lastFile) {
lastLine = frame.line;
lastFile = frame.file;
TextEditor::BaseTextEditor::openEditorAt(frame.file, frame.line);
if (setMarker) {
resetLocation();
m_locationMark = new LocationMark(frame.file, frame.line);
}
}
}
}