diff --git a/Engine/KnobTypes.cpp b/Engine/KnobTypes.cpp index 934b6b2fc3..d625edacf6 100644 --- a/Engine/KnobTypes.cpp +++ b/Engine/KnobTypes.cpp @@ -1140,16 +1140,7 @@ KnobChoice::choiceRestoration(KnobChoice* knob, { assert(knob); - ///Clone first and then handle restoration of the static value - clone(knob); - setSecret( knob->getIsSecret() ); - if ( getDimension() == knob->getDimension() ) { - for (int i = 0; i < knob->getDimension(); ++i) { - setEnabled( i, knob->isEnabled(i) ); - } - } - - + // ensure _currentEntry is set before eventually triggering GUI update { QMutexLocker k(&_entriesMutex); if (id >= 0) { @@ -1160,6 +1151,15 @@ KnobChoice::choiceRestoration(KnobChoice* knob, } } + ///Clone first and then handle restoration of the static value + clone(knob); + setSecret( knob->getIsSecret() ); + if ( getDimension() == knob->getDimension() ) { + for (int i = 0; i < knob->getDimension(); ++i) { + setEnabled( i, knob->isEnabled(i) ); + } + } + if (id >= 0) { setValue(id); }