automatically select the system monitor profile if the preferences say so

Fix for issue #3821
This commit is contained in:
Alberto Griggio
2017-04-12 16:20:03 +02:00
parent 239476cc3a
commit ecae94f17c
7 changed files with 70 additions and 4 deletions

View File

@@ -302,6 +302,8 @@ public:
if (loadAll) {
loadProfiles(stdProfilesDir, nullptr, nullptr, &fileStdProfilesFileNames, true);
}
defaultMonitorProfile = settings->monitorProfile;
}
cmsHPROFILE workingSpace(const Glib::ustring& name) const
@@ -534,6 +536,16 @@ public:
return getProofIntents(getProfile(name));
}
Glib::ustring getDefaultMonitorProfileName() const
{
return defaultMonitorProfile;
}
void setDefaultMonitorProfileName(const Glib::ustring &name)
{
defaultMonitorProfile = name;
}
private:
using ProfileMap = std::map<Glib::ustring, cmsHPROFILE>;
using MatrixMap = std::map<Glib::ustring, TMatrix>;
@@ -617,6 +629,18 @@ rtengine::ProfileContent rtengine::ICCStore::getContent(const Glib::ustring& nam
return implementation->getContent(name);
}
Glib::ustring rtengine::ICCStore::getDefaultMonitorProfileName() const
{
return implementation->getDefaultMonitorProfileName();
}
void rtengine::ICCStore::setDefaultMonitorProfileName(const Glib::ustring &name)
{
implementation->setDefaultMonitorProfileName(name);
}
cmsHPROFILE rtengine::ICCStore::getXYZProfile() const
{
return implementation->getXYZProfile();