cache: fixed signalling issue where changing default input didn't update the cache

This commit is contained in:
itsmattkc
2020-04-21 23:48:26 +10:00
parent 81ad7b5054
commit 38fcad6a3f
9 changed files with 79 additions and 51 deletions
+4 -26
View File
@@ -52,9 +52,9 @@ void Project::Load(QXmlStreamReader *reader, const QAtomicInt* cancelled)
// Read color management info
while (XMLReadNextStartElement(reader)) {
if (reader->name() == QStringLiteral("config")) {
set_ocio_config(reader->readElementText());
color_manager_.SetConfig(reader->readElementText());
} else if (reader->name() == QStringLiteral("default")) {
set_default_input_colorspace(reader->readElementText());
color_manager_.SetDefaultInputColorSpace(reader->readElementText());
} else {
reader->skipCurrentElement();
}
@@ -86,9 +86,9 @@ void Project::Save(QXmlStreamWriter *writer) const
writer->writeStartElement("colormanagement");
writer->writeTextElement("config", ocio_config_);
writer->writeTextElement("config", color_manager_.GetConfigFilename());
writer->writeTextElement("default", default_input_colorspace());
writer->writeTextElement("default", color_manager_.GetDefaultInputColorSpace());
writer->writeEndElement(); // colormanagement
@@ -135,28 +135,6 @@ void Project::set_filename(const QString &s)
emit NameChanged();
}
const QString &Project::ocio_config() const
{
return ocio_config_;
}
void Project::set_ocio_config(const QString &ocio_config)
{
color_manager_.SetConfig(ocio_config);
ocio_config_ = ocio_config;
}
const QString &Project::default_input_colorspace() const
{
return color_manager_.GetDefaultInputColorSpace();
}
void Project::set_default_input_colorspace(const QString &colorspace)
{
color_manager_.SetDefaultInputColorSpace(colorspace);
}
ColorManager *Project::color_manager()
{
return &color_manager_;