From a9fc506ac96e5d5f5e9561fc33c2de5f52d39e55 Mon Sep 17 00:00:00 2001 From: Hombre Date: Sat, 3 Sep 2016 23:29:26 +0200 Subject: [PATCH] Bugfix: the options file were reseted unexpectedly The error was that it was reading a wrong value, which thrown an exception, but the error was diplayed in verbose mode only. Bug fixed, and now it'll report any error in evry case. --- rtgui/options.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/rtgui/options.cc b/rtgui/options.cc index 8bf8de19f..774afde2e 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -1473,7 +1473,7 @@ int Options::readFromFile (Glib::ustring fname) rtSettings.monitorIntent = static_cast(keyFile.get_integer("Color Management", "Intent")); } - if (keyFile.has_key ("Color Management", "Intent")) { + if (keyFile.has_key ("Color Management", "MonitorBPC")) { rtSettings.monitorBPC = keyFile.get_boolean("Color Management", "MonitorBPC"); } @@ -1796,13 +1796,9 @@ int Options::readFromFile (Glib::ustring fname) } } catch (Glib::Error &err) { - if (options.rtSettings.verbose) { - printf("Options::readFromFile / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); - } + printf("Options::readFromFile / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); } catch (...) { - if (options.rtSettings.verbose) { - printf("Options::readFromFile / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); - } + printf("Options::readFromFile / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); } return 1;