cache: fixed signalling issue where changing default input didn't update the cache
This commit is contained in:
@@ -47,7 +47,7 @@ VideoStreamProperties::VideoStreamProperties(ImageStreamPtr stream) :
|
||||
OCIO::ConstConfigRcPtr config = stream->footage()->project()->color_manager()->GetConfig();
|
||||
int number_of_colorspaces = config->getNumColorSpaces();
|
||||
|
||||
video_color_space_->addItem(tr("Default (%1)").arg(stream->footage()->project()->default_input_colorspace()));
|
||||
video_color_space_->addItem(tr("Default (%1)").arg(stream->footage()->project()->color_manager()->GetDefaultInputColorSpace()));
|
||||
|
||||
for (int i=0;i<number_of_colorspaces;i++) {
|
||||
QString colorspace = config->getColorSpaceNameByIndex(i);
|
||||
|
||||
@@ -85,17 +85,15 @@ ProjectPropertiesDialog::ProjectPropertiesDialog(Project* p, QWidget *parent) :
|
||||
return;
|
||||
}
|
||||
|
||||
ocio_filename_->setText(working_project_->ocio_config());
|
||||
ListPossibleInputSpaces(working_project_->ocio_config());
|
||||
ocio_filename_->setText(working_project_->color_manager()->GetConfigFilename());
|
||||
ListPossibleInputSpaces(working_project_->color_manager()->GetConfigFilename());
|
||||
}
|
||||
|
||||
void ProjectPropertiesDialog::accept()
|
||||
{
|
||||
try {
|
||||
// This should ripple changes throughout the program that the color config has changed, therefore must be done last
|
||||
working_project_->set_ocio_config(ocio_filename_->text());
|
||||
|
||||
working_project_->set_default_input_colorspace(default_input_colorspace_->currentText());
|
||||
working_project_->color_manager()->SetConfigAndDefaultInput(ocio_filename_->text(), default_input_colorspace_->currentText());
|
||||
|
||||
QDialog::accept();
|
||||
} catch (OCIO::Exception& e) {
|
||||
@@ -132,7 +130,7 @@ void ProjectPropertiesDialog::ListPossibleInputSpaces(const QString& fn)
|
||||
foreach (QString cs, input_cs) {
|
||||
default_input_colorspace_->addItem(cs);
|
||||
|
||||
if (cs == working_project_->default_input_colorspace()) {
|
||||
if (cs == working_project_->color_manager()->GetDefaultInputColorSpace()) {
|
||||
default_input_colorspace_->setCurrentIndex(default_input_colorspace_->count()-1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user