Commit e30c653e authored by Jan Möbius's avatar Jan Möbius

Make sure windowsstates file exists before using it



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14013 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d098feda
......@@ -581,6 +581,9 @@ Core::init() {
if ( OpenFlipper::Options::gui() ) {
QFile statesFile(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() + "WindowStates.dat");
if (statesFile.exists() ) {
QSettings windowStates(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() + "WindowStates.dat", QSettings::IniFormat);
//try to restore the windowState
......@@ -602,6 +605,13 @@ Core::init() {
coreWidget_->toolBox_->restoreState (windowStates);
windowStates.endGroup ();
} else {
coreWidget_->show();
applyOptions();
}
if ( OpenFlipperSettings().value("Core/Gui/splash",true).toBool() ) {
splash_->finish(coreWidget_);
}
......
......@@ -194,7 +194,7 @@ void Core::setupOptions() {
if ( localIni.exists() )
optionFiles.push_back(OpenFlipper::Options::configDirStr() + OpenFlipper::Options::dirSeparator() + "OpenFlipper.ini");
// Set the previously generated Optionfiles
// Set the previously generated option files
OpenFlipper::Options::optionFiles(optionFiles);
// ==============================================================
......
Markdown is supported
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