MainWindow: Don't save UI geometry in batch mode. Batch mode was erasing the UI geometry for the sessions where batch mode is off. Render widget is still saved.

This commit is contained in:
TryTwo 2024-06-07 03:58:00 -07:00
parent fa00728d3e
commit 28c28623a8
1 changed files with 5 additions and 2 deletions

View File

@ -346,8 +346,11 @@ MainWindow::~MainWindow()
QSettings& settings = Settings::GetQSettings();
settings.setValue(QStringLiteral("mainwindow/state"), saveState());
settings.setValue(QStringLiteral("mainwindow/geometry"), saveGeometry());
if (!Settings::Instance().IsBatchModeEnabled())
{
settings.setValue(QStringLiteral("mainwindow/state"), saveState());
settings.setValue(QStringLiteral("mainwindow/geometry"), saveGeometry());
}
settings.setValue(QStringLiteral("renderwidget/geometry"), m_render_widget_geometry);