1
0
Fork 0

GUI: don't allow inactive breakpoints to be enabled/disabled

This commit is contained in:
Duncan Ogilvie 2020-04-01 23:57:22 +02:00
parent 6f92c63ce2
commit 9c6710094e
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ void BreakpointsView::setupContextMenu()
QAction* enableDisableBreakpoint = makeShortcutAction(DIcon("breakpoint_disable.png"), tr("Disable"), SLOT(toggleBreakpointSlot()), "ActionEnableDisableBreakpoint");
mMenuBuilder->addAction(enableDisableBreakpoint, [this, enableDisableBreakpoint](QMenu*)
{
if(!isValidBp())
if(!isValidBp() || !selectedBp().active)
return false;
if(selectedBp().enabled)
{
@ -585,7 +585,7 @@ void BreakpointsView::removeBreakpointSlot()
void BreakpointsView::toggleBreakpointSlot()
{
for(int i : getSelection())
if(isValidBp(i))
if(isValidBp(i) && selectedBp(i).active)
Breakpoints::toggleBPByDisabling(selectedBp(i));
}