Skip to content

Commit 8e10e8c

Browse files
committed
re-implement QgisApp::removeDockWidget to remove dock widget action from panel menu when plugins are disabled (#4796)
1 parent 55fc81d commit 8e10e8c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/app/qgisapp.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -1852,6 +1852,12 @@ void QgisApp::addDockWidget( Qt::DockWidgetArea theArea, QDockWidget * thepDockW
18521852
mMapCanvas->refresh();
18531853
}
18541854

1855+
void QgisApp::removeDockWidget( QDockWidget * thepDockWidget )
1856+
{
1857+
QMainWindow::removeDockWidget( thepDockWidget );
1858+
mPanelMenu->removeAction( thepDockWidget->toggleViewAction() );
1859+
}
1860+
18551861
QToolBar *QgisApp::addToolBar( QString name )
18561862
{
18571863
QToolBar *toolBar = QMainWindow::addToolBar( name );

src/app/qgisapp.h

+1
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
187187
* After adding the dock widget to the ui (by delegating to the QMainWindow
188188
* parent class, it will also add it to the View menu list of docks.*/
189189
void addDockWidget( Qt::DockWidgetArea area, QDockWidget * dockwidget );
190+
void removeDockWidget( QDockWidget * dockwidget );
190191
/** Add a toolbar to the main window. Overloaded from QMainWindow.
191192
* After adding the toolbar to the ui (by delegating to the QMainWindow
192193
* parent class, it will also add it to the View menu list of toolbars.*/

0 commit comments

Comments
 (0)