Skip to content

Commit

Permalink
Open a specific page in the layer properties dialog using the iface i…
Browse files Browse the repository at this point in the history
…nstance
  • Loading branch information
suricactus committed Apr 6, 2021
1 parent b6de378 commit 3057966
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion python/gui/auto_generated/qgisinterface.sip.in
Expand Up @@ -1138,7 +1138,7 @@ Removes the specified ``dock`` widget from main window (without deleting it).
.. seealso:: :py:func:`addDockWidget`
%End

virtual void showLayerProperties( QgsMapLayer *l ) = 0;
virtual void showLayerProperties( QgsMapLayer *l, const QString &page = QString() ) = 0;
%Docstring
Open layer properties dialog
%End
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgisappinterface.cpp
Expand Up @@ -497,11 +497,11 @@ QgsAdvancedDigitizingDockWidget *QgisAppInterface::cadDockWidget()
return qgis->cadDockWidget();
}

void QgisAppInterface::showLayerProperties( QgsMapLayer *l )
void QgisAppInterface::showLayerProperties( QgsMapLayer *l, const QString &page )
{
if ( l && qgis )
{
qgis->showLayerProperties( l );
qgis->showLayerProperties( l, page );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisappinterface.h
Expand Up @@ -137,7 +137,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
void addTabifiedDockWidget( Qt::DockWidgetArea area, QDockWidget *dockwidget, const QStringList &tabifyWith = QStringList(), bool raiseTab = false ) override;
void removeDockWidget( QDockWidget *dockwidget ) override;
QgsAdvancedDigitizingDockWidget *cadDockWidget() override;
void showLayerProperties( QgsMapLayer *l ) override;
void showLayerProperties( QgsMapLayer *l, const QString &page = QString() ) override;
QDialog *showAttributeTable( QgsVectorLayer *l, const QString &filterExpression = QString() ) override;
void addWindow( QAction *action ) override;
void removeWindow( QAction *action ) override;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgisinterface.h
Expand Up @@ -972,7 +972,7 @@ class GUI_EXPORT QgisInterface : public QObject
virtual void removeDockWidget( QDockWidget *dockwidget ) = 0;

//! Open layer properties dialog
virtual void showLayerProperties( QgsMapLayer *l ) = 0;
virtual void showLayerProperties( QgsMapLayer *l, const QString &page = QString() ) = 0;

//! Open attribute table dialog
virtual QDialog *showAttributeTable( QgsVectorLayer *l, const QString &filterExpression = QString() ) = 0;
Expand Down

0 comments on commit 3057966

Please sign in to comment.