mirror of
https://github.com/epasveer/seer.git
synced 2026-08-31 01:20:45 +08:00
Add deleteall and deleteselected to RMB context menu for Logger and Tracker
This commit is contained in:
@@ -464,6 +464,9 @@ void SeerVariableTrackerBrowserWidget::handleContextMenu (const QPoint& pos) {
|
||||
structVisualizerMenu.addAction(addStructAmpersandVisualizerAction);
|
||||
menu.addMenu(&structVisualizerMenu);
|
||||
|
||||
QAction* deleteAction = menu.addAction("Delete selected");
|
||||
QAction* deleteAllAction = menu.addAction("Delete all");
|
||||
|
||||
QAction* copyAction = menu.addAction("Copy selected");
|
||||
QAction* copyAllAction = menu.addAction("Copy all");
|
||||
|
||||
@@ -496,12 +499,13 @@ void SeerVariableTrackerBrowserWidget::handleContextMenu (const QPoint& pos) {
|
||||
addStructAsteriskVisualizerAction->setText(QString("\"*%1\"").arg(actionText));
|
||||
addStructAmpersandVisualizerAction->setText(QString("\"&&%1\"").arg(actionText));
|
||||
|
||||
// If no selected item, disable everything but allow 'copyall'.
|
||||
// If no selected item, disable everything but allow 'copyall' and 'deleteall'.
|
||||
if (item == 0) {
|
||||
memoryVisualizerMenu.setEnabled(false);
|
||||
arrayVisualizerMenu.setEnabled(false);
|
||||
matrixVisualizerMenu.setEnabled(false);
|
||||
structVisualizerMenu.setEnabled(false);
|
||||
deleteAction->setEnabled(false);
|
||||
copyAction->setEnabled(false);
|
||||
}
|
||||
|
||||
@@ -512,7 +516,15 @@ void SeerVariableTrackerBrowserWidget::handleContextMenu (const QPoint& pos) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (action == copyAction || action == copyAction) {
|
||||
if (action == deleteAction) {
|
||||
handleDeleteToolButton();
|
||||
}
|
||||
|
||||
if (action == deleteAllAction) {
|
||||
handleDeleteAllToolButton();
|
||||
}
|
||||
|
||||
if (action == copyAction || action == copyAllAction) {
|
||||
// Get selected tree items.
|
||||
QList<QTreeWidgetItem*> items;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user