From d3ab1048187add2ac0b736931041cb54df5120d4 Mon Sep 17 00:00:00 2001 From: Hombre Date: Wed, 26 Apr 2017 00:07:20 +0200 Subject: [PATCH] Dynamic profiles wasn't loaded in Preference (#3691) --- rtengine/dynamicprofile.cc | 6 +++++- rtengine/dynamicprofile.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rtengine/dynamicprofile.cc b/rtengine/dynamicprofile.cc index 380af29be..5ac408da5 100644 --- a/rtengine/dynamicprofile.cc +++ b/rtengine/dynamicprofile.cc @@ -246,8 +246,12 @@ bool DynamicProfileRules::storeRules() return kf.save_to_file (Glib::build_filename (Options::rtdir, "dynamicprofile.cfg")); } -const std::vector &DynamicProfileRules::getRules() const +const std::vector &DynamicProfileRules::getRules() { + if (!rulesLoaded) { + loadRules(); + } + return dynamicRules; } diff --git a/rtengine/dynamicprofile.h b/rtengine/dynamicprofile.h index b59838e3f..cfe46d9ba 100644 --- a/rtengine/dynamicprofile.h +++ b/rtengine/dynamicprofile.h @@ -72,7 +72,7 @@ protected: public: bool loadRules(); bool storeRules(); - const std::vector &getRules() const; + const std::vector &getRules(); void setRules (const std::vector &r); };