mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 10:15:43 +08:00
refs #680, now display CDockWidget context menus in views/info area
This commit is contained in:
@@ -611,6 +611,16 @@ namespace BlackGui
|
||||
if (menuActions.isEmpty()) { return; }
|
||||
menuActions.toQMenu(menu, true);
|
||||
|
||||
// Nested dock widget menu
|
||||
const CDockWidgetInfoArea *dockWidget = this->getDockWidgetInfoArea();
|
||||
if (dockWidget)
|
||||
{
|
||||
if (!menu.isEmpty()) { menu.addSeparator(); }
|
||||
const QString mm = QString("Dock widget '%1'").arg(dockWidget->windowTitleOrBackup());
|
||||
QMenu *dockWidgetSubMenu = menu.addMenu(CIcons::text16(), mm);
|
||||
dockWidget->addToContextMenu(dockWidgetSubMenu);
|
||||
}
|
||||
|
||||
QPoint globalPos = this->mapToGlobal(pos);
|
||||
menu.exec(globalPos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user