Skip to content

Commit

Permalink
Engine/Project: update default format after load
Browse files Browse the repository at this point in the history
  • Loading branch information
rodlie committed Dec 13, 2019
1 parent be4cd8d commit 0c629cc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Engine/Project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,17 @@ Project::loadProjectInternal(const QString & path,
getProjectDefaultFormat(&f);
Q_EMIT formatChanged(f);

// set new default format (if needed)
const std::vector<Format> & appFormats = appPTR->getFormats();
for (U32 i = 0; i < appFormats.size(); ++i) {
if (f == appFormats[i]) {
if (_imp->formatKnob->getDefaultValue(0) != i) {
_imp->formatKnob->setDefaultValue(i, 0);
}
break;
}
}

_imp->natronVersion->setValue( generateUserFriendlyNatronVersionName() );
if (isAutoSave) {
_imp->autoSetProjectFormat = false;
Expand Down

0 comments on commit 0c629cc

Please sign in to comment.