Skip to content
Snippets Groups Projects
Commit 3cb91a14 authored by hjk's avatar hjk
Browse files

debugger: Fix state of breakpoint marker when disabling it using the breakpoint view

There was not updated cached state within the marker object.

Reviewed-by: Friedemann Kleint

Task: QTCREATORBUG-2544
parent da91600b
No related branches found
Tags v5.12.4
No related merge requests found
...@@ -584,6 +584,7 @@ void BreakHandler::toggleBreakpointEnabled(BreakpointData *data) ...@@ -584,6 +584,7 @@ void BreakHandler::toggleBreakpointEnabled(BreakpointData *data)
m_enabled.removeAll(data); m_enabled.removeAll(data);
m_disabled.append(data); m_disabled.append(data);
} }
data->removeMarker(); // Force icon update.
data->updateMarker(); data->updateMarker();
emit layoutChanged(); emit layoutChanged();
m_engine->attemptBreakpointSynchronization(); m_engine->attemptBreakpointSynchronization();
......
...@@ -74,7 +74,6 @@ public: ...@@ -74,7 +74,6 @@ public:
{ {
m_data = data; m_data = data;
m_pending = true; m_pending = true;
m_enabled = true;
//qDebug() << "CREATE MARKER " << fileName << lineNumber; //qDebug() << "CREATE MARKER " << fileName << lineNumber;
} }
...@@ -87,19 +86,18 @@ public: ...@@ -87,19 +86,18 @@ public:
QIcon icon() const QIcon icon() const
{ {
const BreakHandler *handler = m_data->handler(); const BreakHandler *handler = m_data->handler();
if (!m_data->enabled)
return handler->disabledBreakpointIcon();
if (!handler->isActive()) if (!handler->isActive())
return handler->emptyIcon(); return handler->emptyIcon();
if (!m_enabled)
return handler->disabledBreakpointIcon();
return m_pending ? handler->pendingBreakPointIcon() : handler->breakpointIcon(); return m_pending ? handler->pendingBreakPointIcon() : handler->breakpointIcon();
} }
void setPending(bool pending, bool enabled) void setPending(bool pending)
{ {
if (pending == m_pending && enabled == m_enabled) if (pending == m_pending)
return; return;
m_pending = pending; m_pending = pending;
m_enabled = enabled;
updateMarker(); updateMarker();
} }
...@@ -149,7 +147,6 @@ public: ...@@ -149,7 +147,6 @@ public:
private: private:
BreakpointData *m_data; BreakpointData *m_data;
bool m_pending; bool m_pending;
bool m_enabled;
}; };
...@@ -243,7 +240,7 @@ void BreakpointData::updateMarker() ...@@ -243,7 +240,7 @@ void BreakpointData::updateMarker()
marker = new BreakpointMarker(this, m_markerFileName, m_markerLineNumber); marker = new BreakpointMarker(this, m_markerFileName, m_markerLineNumber);
if (marker) if (marker)
marker->setPending(pending, enabled); marker->setPending(pending);
} }
void BreakpointData::setMarkerFileName(const QString &fileName) void BreakpointData::setMarkerFileName(const QString &fileName)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment