mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
Init Layout after loading Plugin UI (#1407)
* Init Layout after loading Plugin UI * Make sure all Dock Widgets are part of the MainWindow
This commit is contained in:
parent
45698112c2
commit
f514a1c3c7
@ -124,7 +124,6 @@ void MainWindow::initUI()
|
||||
|
||||
initToolBar();
|
||||
initDocks();
|
||||
initLayout();
|
||||
|
||||
/*
|
||||
* Some global shortcuts
|
||||
@ -165,6 +164,8 @@ void MainWindow::initUI()
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
|
||||
setDockOptions(dockOptions() | DockOption::GroupedDragging);
|
||||
#endif
|
||||
|
||||
initLayout();
|
||||
}
|
||||
|
||||
void MainWindow::initToolBar()
|
||||
@ -455,7 +456,7 @@ void MainWindow::addPluginDockWidget(QDockWidget *dockWidget, QAction *action)
|
||||
addDockWidget(Qt::TopDockWidgetArea, dockWidget);
|
||||
addDockWidgetAction(dockWidget, action);
|
||||
ui->menuPlugins->addAction(action);
|
||||
tabifyDockWidget(dashboardDock, dockWidget);
|
||||
addDockWidget(Qt::DockWidgetArea::TopDockWidgetArea, dockWidget);
|
||||
updateDockActionChecked(action);
|
||||
}
|
||||
|
||||
@ -646,6 +647,16 @@ void MainWindow::readSettingsOrDefault()
|
||||
hideAllDocks();
|
||||
restoreGeometry(geo);
|
||||
restoreState(state);
|
||||
|
||||
// make sure all DockWidgets are part of the MainWindow
|
||||
// also show them, so newly installed plugin widgets are shown right away
|
||||
for (auto dockWidget : dockWidgets) {
|
||||
if (dockWidgetArea(dockWidget) == Qt::DockWidgetArea::NoDockWidgetArea) {
|
||||
addDockWidget(Qt::DockWidgetArea::TopDockWidgetArea, dockWidget);
|
||||
dockWidget->show();
|
||||
}
|
||||
}
|
||||
|
||||
responsive = settings.value("responsive").toBool();
|
||||
panelLock = settings.value("panelLock").toBool();
|
||||
setPanelLock();
|
||||
|
Loading…
Reference in New Issue
Block a user