diff --git a/rtengine/init.cc b/rtengine/init.cc index 7ac4ca35b..41f599b01 100644 --- a/rtengine/init.cc +++ b/rtengine/init.cc @@ -51,7 +51,11 @@ int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDi Color::init (); PerceptualToneCurve::init (); RawImageSource::init (); - LFDatabase::init(s->lensfunDbDirectory); + if (s->lensfunDbDirectory.empty() || Glib::path_is_absolute(s->lensfunDbDirectory)) { + LFDatabase::init(s->lensfunDbDirectory); + } else { + LFDatabase::init(Glib::build_filename(baseDir, s->lensfunDbDirectory)); + } delete lcmsMutex; lcmsMutex = new MyMutex; dfm.init( s->darkFramesPath ); diff --git a/rtgui/main-cli.cc b/rtgui/main-cli.cc index 74f2e1b65..1cb63ef6d 100644 --- a/rtgui/main-cli.cc +++ b/rtgui/main-cli.cc @@ -145,11 +145,7 @@ int main (int argc, char **argv) licensePath = Glib::build_filename (exePath, LICENCE_SEARCH_PATH); } - if (Glib::path_is_absolute(LENSFUN_DB_PATH)) { - options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH; - } else { - options.rtSettings.lensfunDbDirectory = Glib::build_filename(exePath, LENSFUN_DB_PATH); - } + options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH; #else argv0 = DATA_SEARCH_PATH; diff --git a/rtgui/main.cc b/rtgui/main.cc index 6cbddc305..4bf9a92fd 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -530,11 +530,7 @@ int main (int argc, char **argv) licensePath = Glib::build_filename (exePath, LICENCE_SEARCH_PATH); } - if (Glib::path_is_absolute (LENSFUN_DB_PATH)) { - options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH; - } else { - options.rtSettings.lensfunDbDirectory = Glib::build_filename (exePath, LENSFUN_DB_PATH); - } + options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH; #else argv0 = DATA_SEARCH_PATH; diff --git a/rtgui/options.cc b/rtgui/options.cc index 039be2b20..9517e2fbc 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -519,8 +519,7 @@ void Options::setDefaults () #endif // 0 = SET mode, 1 = ADD mode - baBehav.clear(); - baBehav.resize(ADDSET_PARAM_NUM, 0); + baBehav.assign(ADDSET_PARAM_NUM, 0); rtSettings.darkFramesPath = ""; rtSettings.flatFieldsPath = ""; diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index 1ce3f00aa..38decb412 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -2582,8 +2582,7 @@ bool Preferences::splashClosed (GdkEventAny* event) void Preferences::behAddSetAllPressed (bool add) { - moptions.baBehav.clear(); - moptions.baBehav.resize(ADDSET_PARAM_NUM, add); + moptions.baBehav.assign(ADDSET_PARAM_NUM, add); for (Gtk::TreeIter sections = behModel->children().begin(); sections != behModel->children().end(); ++sections) { for (Gtk::TreeIter adjs = sections->children().begin(); adjs != sections->children().end(); ++adjs) { adjs->set_value(behavColumns.badd, add);