mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Fix error when enabling additional providers in processing
Add an interface method to show the options dialog at a specific page. This is required since plugins can now embed their options in the main options dialog, so they may also need a way to force this dialog to open. Implement this in processing so that enabling additional providers works again.
This commit is contained in:
parent
109be1b0bb
commit
2354696f26
@ -213,6 +213,7 @@ class QgisInterface : QObject
|
||||
virtual QList<QgsComposerInterface *> openComposers() = 0;
|
||||
virtual QgsComposerInterface *openComposer( QgsComposition *composition ) = 0;
|
||||
virtual void closeComposer( QgsComposition *composition ) = 0;
|
||||
virtual void showOptionsDialog( QWidget *parent = 0, const QString ¤tPage = QString() ) = 0;
|
||||
|
||||
virtual QMap<QString, QVariant> defaultStyleSheetOptions() = 0;
|
||||
|
||||
|
@ -73,6 +73,7 @@ class ConfigOptionsPage(QgsOptionsPageWidget):
|
||||
layout.setMargin(0)
|
||||
self.setLayout(layout)
|
||||
layout.addWidget(self.config_widget)
|
||||
self.setObjectName('processingOptions')
|
||||
|
||||
def apply(self):
|
||||
self.config_widget.accept()
|
||||
|
@ -74,8 +74,7 @@ class ProcessingToolbox(BASE, WIDGET):
|
||||
self.txtTip.setVisible(False)
|
||||
self.tipWasClosed = True
|
||||
else:
|
||||
dlg = ConfigDialog(self)
|
||||
dlg.exec_()
|
||||
iface.showOptionsDialog(iface.mainWindow(), 'processingOptions')
|
||||
self.txtTip.setVisible(self.disabledProviders())
|
||||
self.txtTip.linkActivated.connect(openSettings)
|
||||
if hasattr(self.searchBox, 'setPlaceholderText'):
|
||||
|
@ -418,6 +418,11 @@ void QgisAppInterface::closeComposer( QgsComposition *composition )
|
||||
}
|
||||
}
|
||||
|
||||
void QgisAppInterface::showOptionsDialog( QWidget *parent, const QString ¤tPage )
|
||||
{
|
||||
return qgis->showOptionsDialog( parent, currentPage );
|
||||
}
|
||||
|
||||
QMap<QString, QVariant> QgisAppInterface::defaultStyleSheetOptions()
|
||||
{
|
||||
return qgis->styleSheetBuilder()->defaultOptions();
|
||||
|
@ -208,6 +208,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
|
||||
QList<QgsComposerInterface *> openComposers() override;
|
||||
QgsComposerInterface *openComposer( QgsComposition *composition ) override;
|
||||
void closeComposer( QgsComposition *composition ) override;
|
||||
virtual void showOptionsDialog( QWidget *parent = nullptr, const QString ¤tPage = QString() ) override;
|
||||
|
||||
//! Return changeable options built from settings and/or defaults
|
||||
QMap<QString, QVariant> defaultStyleSheetOptions() override;
|
||||
|
@ -293,6 +293,13 @@ class GUI_EXPORT QgisInterface : public QObject
|
||||
*/
|
||||
virtual void closeComposer( QgsComposition *composition ) = 0;
|
||||
|
||||
/**
|
||||
* Opens the options dialog. The \a currentPage argument can be used to force
|
||||
* the dialog to open at a specific page.
|
||||
* @note added in QGIS 3.0
|
||||
*/
|
||||
virtual void showOptionsDialog( QWidget *parent = nullptr, const QString ¤tPage = QString() ) = 0;
|
||||
|
||||
//! Return changeable options built from settings and/or defaults
|
||||
virtual QMap<QString, QVariant> defaultStyleSheetOptions() = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user