mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Fix macOS Preferences menu hijacking
This commit is contained in:
parent
12a4a9c9bd
commit
94dd1f4456
@ -96,6 +96,8 @@ class ProcessingPlugin(object):
|
||||
QIcon(os.path.join(cmd_folder, 'images', 'config.png')),
|
||||
self.tr('&Options...'), self.iface.mainWindow())
|
||||
self.configAction.setObjectName('configAction')
|
||||
self.configAction.setMenuRole(QAction.NoRole)
|
||||
|
||||
self.configAction.triggered.connect(self.openConfig)
|
||||
self.iface.registerMainWindowAction(self.configAction, 'Ctrl+Alt+C')
|
||||
self.menu.addAction(self.configAction)
|
||||
|
@ -2028,7 +2028,11 @@ void QgisApp::createMenus()
|
||||
// keep plugins from hijacking About and Preferences application menus
|
||||
// these duplicate actions will be moved to application menus by Qt
|
||||
mProjectMenu->addAction( mActionAbout );
|
||||
mProjectMenu->addAction( mActionOptions );
|
||||
QAction* actionPrefs = new QAction( tr( "Preferences..." ), this );
|
||||
actionPrefs->setMenuRole( QAction::PreferencesRole );
|
||||
actionPrefs->setIcon( mActionOptions->icon() );
|
||||
connect( actionPrefs, SIGNAL( triggered() ), this, SLOT( options() ) );
|
||||
mProjectMenu->addAction( actionPrefs );
|
||||
|
||||
// Window Menu
|
||||
|
||||
|
@ -1583,7 +1583,7 @@
|
||||
<string>&Options...</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::PreferencesRole</enum>
|
||||
<enum>QAction::NoRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="mActionCustomProjection">
|
||||
|
Loading…
x
Reference in New Issue
Block a user