forked from qt-creator/qt-creator
Debugger: Disable inapplicable context menu entries for sub-breakpoints
Task-Number: QTCREATORBUG-9984 Change-Id: Id4197b8d0db917606eb0e2767d2b05195e6cfbcd Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -748,11 +748,14 @@ void BreakTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
||||
selectedIndices.append(indexUnderMouse);
|
||||
|
||||
BreakHandler *handler = breakHandler();
|
||||
BreakpointModelIds selectedIds = handler->findBreakpointsByIndex(selectedIndices);
|
||||
BreakpointModelIds selectedIds;
|
||||
foreach (BreakpointModelId id, handler->findBreakpointsByIndex(selectedIndices))
|
||||
if (id.isMajor())
|
||||
selectedIds.append(id);
|
||||
|
||||
const int rowCount = model()->rowCount();
|
||||
QAction *deleteAction = new QAction(tr("Delete Breakpoint"), &menu);
|
||||
deleteAction->setEnabled(!selectedIds.isEmpty());
|
||||
deleteAction->setEnabled(!selectedIds.empty());
|
||||
|
||||
QAction *deleteAllAction = new QAction(tr("Delete All Breakpoints"), &menu);
|
||||
deleteAllAction->setEnabled(model()->rowCount() > 0);
|
||||
|
||||
Reference in New Issue
Block a user