summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-08-16 08:02:14 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-08-16 08:02:14 -0400
commita5cb39aaf44b1f84003fb2ec2d36f07bf28916e4 (patch)
tree083e7ca94003ac269b323f135b9eafe560e5aedc /src/main.cpp
parent3f487a5a6c9c23824298fdde3d76dc82edf3ca46 (diff)
moved all geometry save, restore and reset to GeometrySettings
changed reset button in settings to restart immediately
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 8eee41e4..6d4108fa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -718,6 +718,7 @@ int runApplication(MOApplication &application, SingleInstance &instance,
}
int res = 1;
+
{ // scope to control lifetime of mainwindow
// set up main window and its data structures
MainWindow mainWindow(settings, organizer, pluginContainer);
@@ -743,17 +744,20 @@ int runApplication(MOApplication &application, SingleInstance &instance,
splash.finish(&mainWindow);
- const auto ret = application.exec();
+ res = application.exec();
NexusInterface::instance(&pluginContainer)
->getAccessManager()->setTopLevelWidget(nullptr);
-
- return ret;
}
+
+ settings.geometry().resetIfNeeded();
+ return res;
+
} catch (const std::exception &e) {
reportError(e.what());
- return 1;
}
+
+ return 1;
}
int doCoreDump(env::CoreDumpTypes type)