Move toolbar back to top of main window when unmovable

* Fix #9384
This commit is contained in:
Jonathan White 2023-08-05 23:08:29 -04:00
parent 286b5cf9a4
commit c041f45138

View File

@ -1672,7 +1672,12 @@ void MainWindow::applySettingsChanges()
}
m_ui->toolBar->setHidden(config()->get(Config::GUI_HideToolbar).toBool());
m_ui->toolBar->setMovable(config()->get(Config::GUI_MovableToolbar).toBool());
auto movable = config()->get(Config::GUI_MovableToolbar).toBool();
m_ui->toolBar->setMovable(movable);
if (!movable) {
// Move the toolbar back to the top of the main window
addToolBar(Qt::TopToolBarArea, m_ui->toolBar);
}
bool isOk = false;
const auto toolButtonStyle =