Commit 7198b1ea authored by hjk's avatar hjk
Browse files

debugger: fix vanishing location mark in disassembler mode

Task-number: QTCREATORBUG-4157
parent ab60a53c
......@@ -246,6 +246,7 @@ public slots:
void scheduleResetLocation()
{
m_stackHandler.scheduleResetLocation();
m_disassemblerAgent.scheduleResetLocation();
m_locationTimer.setSingleShot(true);
m_locationTimer.start(80);
}
......
......@@ -117,13 +117,15 @@ public:
QHash<QString, DisassemblerLines> cache;
QString mimeType;
bool m_resetLocationScheduled;
};
DisassemblerAgentPrivate::DisassemblerAgentPrivate()
: editor(0),
tryMixed(true),
locationMark(new LocationMark2),
mimeType(_("text/x-qtcreator-generic-asm"))
mimeType(_("text/x-qtcreator-generic-asm")),
m_resetLocationScheduled(false)
{
}
......@@ -162,11 +164,19 @@ void DisassemblerAgent::cleanup()
d->cache.clear();
}
void DisassemblerAgent::scheduleResetLocation()
{
d->m_resetLocationScheduled = true;
}
void DisassemblerAgent::resetLocation()
{
if (!d->editor)
return;
d->editor->markableInterface()->removeMark(d->locationMark);
if (d->m_resetLocationScheduled) {
d->m_resetLocationScheduled = false;
d->editor->markableInterface()->removeMark(d->locationMark);
}
}
static QString frameKey(const Location &loc)
......
......@@ -57,6 +57,7 @@ public:
void setTryMixed(bool on);
void setLocation(const Location &location);
const Location &location() const;
void scheduleResetLocation();
void resetLocation();
void setContents(const DisassemblerLines &contents);
void updateLocationMarker();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment