WSL/SLF GitLab Repository

Commit 648a1e9f authored by Michael Reisecker's avatar Michael Reisecker
Browse files

Now also reset the toolbar position...

Clicking "reset" in the Settings window should now behave the same as if
the settings file was deleted manually before starting, i. e. restore
all defaults immediately.
parent ba426ffd
......@@ -349,16 +349,14 @@ bool MainWindow::setGuiFromIni(INIParser &ini)
*/
void MainWindow::resetAppearance(const bool &restart)
{
if (restart) { //hard reset
sizeAllWindows(); //otherwise we would save back the current size
control_panel_->setSplitterSizes();
sizeAllWindows(); //we must set all this also when restarting, because otherwise
delete toolbar_; //it would be saved right back as-is on program exit
createToolbar();
control_panel_->setSplitterSizes();
if (restart) { //hard reset - will apply appearance settings
qApp->quit();
QProcess::startDetached(qApp->arguments().at(0), qApp->arguments());
} else { //soft reset (will not apply appearance settings)
sizeAllWindows();
delete toolbar_;
createToolbar();
control_panel_->setSplitterSizes();
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment