re-implement QgisApp::removeDockWidget to remove dock widget action from panel menu when plugins are disabled (#4796)

This commit is contained in:
Etienne Tourigny 2012-07-22 19:22:37 -03:00
parent 55fc81d76a
commit 8e10e8cda0
2 changed files with 7 additions and 0 deletions

View File

@ -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 );

View File

@ -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.*/