Main window geometry and state saving/reloading

This commit is contained in:
Sky
2013-11-03 00:45:25 +00:00
parent 8c7f15cefb
commit 09dc356883
2 changed files with 10 additions and 3 deletions

View File

@ -449,9 +449,10 @@ void MainWindow::on_actionEditInstMods_triggered()
void MainWindow::closeEvent(QCloseEvent *event)
{
// Save the window state and geometry.
// TODO: Make this work with the new settings system.
// settings->getConfig().setValue("MainWindowGeometry", saveGeometry());
// settings->getConfig().setValue("MainWindowState", saveState());
MMC->settings()->set("MainWindowState", saveState().toBase64());
MMC->settings()->set("MainWindowGeometry", saveGeometry().toBase64());
QMainWindow::closeEvent(event);
QApplication::exit();
}