Skip to content

Commit

Permalink
Revert "#439 rearranged order in choiceRestoration to ensure _current…
Browse files Browse the repository at this point in the history
…Entry is set before clone, and thus the resulting updateGUI"

This reverts commit 2cabb20.
  • Loading branch information
devernay committed Jan 11, 2020
1 parent 32c8641 commit 838ebf1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Engine/KnobTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,16 @@ KnobChoice::choiceRestoration(KnobChoice* knob,
{
assert(knob);

// ensure _currentEntry is set before eventually triggering GUI update
///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) );
}
}


{
QMutexLocker k(&_entriesMutex);
if (id >= 0) {
Expand All @@ -1151,15 +1160,6 @@ 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);
}
Expand Down

0 comments on commit 838ebf1

Please sign in to comment.