diff --git a/src/widgets/BreakpointWidget.cpp b/src/widgets/BreakpointWidget.cpp index af71fd20..1530ad51 100644 --- a/src/widgets/BreakpointWidget.cpp +++ b/src/widgets/BreakpointWidget.cpp @@ -127,10 +127,19 @@ BreakpointWidget::BreakpointWidget(MainWindow *main, QAction *action) : }); setScrollMode(); + actionDelBreakpoint = new QAction(tr("Delete breakpoint"), this); - actionToggleBreakpoint = new QAction(tr("Toggle breakpoint"), this); + actionDelBreakpoint->setShortcut(Qt::Key_Delete); + actionDelBreakpoint->setShortcutContext(Qt::WidgetShortcut); connect(actionDelBreakpoint, &QAction::triggered, this, &BreakpointWidget::delBreakpoint); + ui->breakpointTreeView->addAction(actionDelBreakpoint); + + actionToggleBreakpoint = new QAction(tr("Toggle breakpoint"), this); + actionToggleBreakpoint->setShortcut(Qt::Key_Space); + actionToggleBreakpoint->setShortcutContext(Qt::WidgetShortcut); connect(actionToggleBreakpoint, &QAction::triggered, this, &BreakpointWidget::toggleBreakpoint); + ui->breakpointTreeView->addAction(actionToggleBreakpoint); + connect(Core(), &CutterCore::refreshAll, this, &BreakpointWidget::refreshBreakpoint); connect(Core(), &CutterCore::breakpointsChanged, this, &BreakpointWidget::refreshBreakpoint); connect(Core(), &CutterCore::refreshCodeViews, this, &BreakpointWidget::refreshBreakpoint);