Patch #2348 2008-01-27 18:09
pecan
Fixes Incorrectly Enabled/Disabled debugger toolbar and menu- Download
- 2348-Fixes_Incorrec.patch (1.7 KB)
Index: src/plugins/debuggergdb/debuggergdb.cpp
===================================================================
--- src/plugins/debuggergdb/debuggergdb.cpp (revision 4831)
+++ src/plugins/debuggergdb/debuggergdb.cpp (working copy)
@@ -1948,9 +1948,9 @@
mbar->Enable(idMenuContinue, m_pProcess && en && stopped);
mbar->Enable(idMenuNext, m_pProcess && en && stopped);
mbar->Enable(idMenuNextInstr, m_pProcess && en && stopped);
- mbar->Enable(idMenuStep, en && stopped);
+ mbar->Enable(idMenuStep, m_pProcess && en && stopped);
mbar->Enable(idMenuStepOut, m_pProcess && en && stopped);
- mbar->Enable(idMenuRunToCursor, en && ed && stopped);
+ mbar->Enable(idMenuRunToCursor, m_pProcess && en && ed && stopped);
mbar->Enable(idMenuToggleBreakpoint, en && ed && stopped);
mbar->Enable(idMenuRemoveAllBreakpoints, en && ed && stopped);
mbar->Enable(idMenuSendCommandToGDB, m_pProcess && stopped);
@@ -1977,10 +1977,10 @@
#ifdef implement_debugger_toolbar
wxToolBar* tbar = m_pTbar;//Manager::Get()->GetAppWindow()->GetToolBar();
tbar->EnableTool(idMenuDebug, (!m_pProcess || stopped) && en);
- tbar->EnableTool(idMenuRunToCursor, en && ed && stopped);
+ tbar->EnableTool(idMenuRunToCursor, m_pProcess && en && ed && stopped);
tbar->EnableTool(idMenuNext, m_pProcess && en && stopped);
tbar->EnableTool(idMenuNextInstr, m_pProcess && en && stopped);
- tbar->EnableTool(idMenuStep, en && stopped);
+ tbar->EnableTool(idMenuStep, m_pProcess && en && stopped);
tbar->EnableTool(idMenuStepOut, m_pProcess && en && stopped);
tbar->EnableTool(idMenuStop, m_pProcess && en);
tbar->EnableTool(idDebuggerToolInfo, m_pProcess && en);
History
mandrav 2008-01-27 19:05
What exactly is "incorrect" according to you in the current implementation?
pecan 2008-01-27 20:17
On my WindowxXP2 system, when a project is loaded, RunToCursor and StepInto are enabled, even though no debugging process is active.
pecan 2008-01-27 20:36
http://forums.codeblocks.org/index.php/topic,7707.msg58083.html#msg58083
Re: Fix for incorrectly Enabled/Disabled Debugger Toolbar Menu items