Skip to content
Permalink
Browse files

re-implement QgisApp::removeDockWidget to remove dock widget action f…

…rom panel menu when plugins are disabled (#4796)
  • Loading branch information
etiennesky committed Jul 22, 2012
1 parent 55fc81d commit 8e10e8cda019d9a52d37c672916c47bcd853bd6d
Showing with 7 additions and 0 deletions.
  1. +6 −0 src/app/qgisapp.cpp
  2. +1 −0 src/app/qgisapp.h
@@ -1852,6 +1852,12 @@ void QgisApp::addDockWidget( Qt::DockWidgetArea theArea, QDockWidget * thepDockW
mMapCanvas->refresh();
}

void QgisApp::removeDockWidget( QDockWidget * thepDockWidget )
{
QMainWindow::removeDockWidget( thepDockWidget );
mPanelMenu->removeAction( thepDockWidget->toggleViewAction() );
}

QToolBar *QgisApp::addToolBar( QString name )
{
QToolBar *toolBar = QMainWindow::addToolBar( name );
@@ -187,6 +187,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
* After adding the dock widget to the ui (by delegating to the QMainWindow
* parent class, it will also add it to the View menu list of docks.*/
void addDockWidget( Qt::DockWidgetArea area, QDockWidget * dockwidget );
void removeDockWidget( QDockWidget * dockwidget );
/** Add a toolbar to the main window. Overloaded from QMainWindow.
* After adding the toolbar to the ui (by delegating to the QMainWindow
* parent class, it will also add it to the View menu list of toolbars.*/

0 comments on commit 8e10e8c

Please sign in to comment.
You can’t perform that action at this time.