mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Don't open non-modal dialog from a modal symbol selector dialog
This commit is contained in:
parent
3b64c34b05
commit
8288debe55
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
qgswindowmanagerinterface.cpp
|
||||
-----------------------------
|
||||
qgsappwindowmanager.cpp
|
||||
-----------------------
|
||||
Date : September 2018
|
||||
Copyright : (C) 2018 Nyall Dawson
|
||||
Email : nyall dot dawson at gmail dot com
|
||||
@ -59,8 +59,8 @@ QWidget *QgsAppWindowManager::openApplicationDialog( QgsAppWindowManager::Applic
|
||||
}
|
||||
mLayoutManagerDialog->show();
|
||||
mLayoutManagerDialog->activate();
|
||||
return mLayoutManagerDialog;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/***************************************************************************
|
||||
qgswindowmanagerinterface.h
|
||||
---------------------------
|
||||
qgsappwindowmanager.h
|
||||
---------------------
|
||||
Date : September 2018
|
||||
Copyright : (C) 2018 Nyall Dawson
|
||||
Email : nyall dot dawson at gmail dot com
|
||||
|
@ -397,8 +397,14 @@ void QgsSymbolsListWidget::updateModelFilters()
|
||||
void QgsSymbolsListWidget::openStyleManager()
|
||||
{
|
||||
// prefer to use global window manager to open the style manager, if possible!
|
||||
// this allows reuse of an existing non-modal window instead of opening a new modal window
|
||||
if ( !QgsGui::windowManager() || !QgsGui::windowManager()->openStandardDialog( QgsWindowManagerInterface::DialogStyleManager ) )
|
||||
// this allows reuse of an existing non-modal window instead of opening a new modal window.
|
||||
// Note that we only use the non-modal dialog if we're open in the panel -- if we're already
|
||||
// open as part of a modal dialog, then we MUST use another modal dialog or the result will
|
||||
// not be focusable!
|
||||
QgsPanelWidget *panel = QgsPanelWidget::findParentPanel( this );
|
||||
if ( !panel || !panel->dockMode()
|
||||
|| !QgsGui::windowManager()
|
||||
|| !QgsGui::windowManager()->openStandardDialog( QgsWindowManagerInterface::DialogStyleManager ) )
|
||||
{
|
||||
// fallback to modal dialog
|
||||
QgsStyleManagerDialog dlg( mStyle, this );
|
||||
|
Loading…
x
Reference in New Issue
Block a user