| 2562 | } |
| 2563 | |
| 2564 | void |
| 2565 | Node::refreshFormatParamChoice(const std::vector<ChoiceOption>& entries, |
| 2566 | int defValue, |
| 2567 | bool loadingProject) |
| 2568 | { |
| 2569 | KnobChoicePtr choice = _imp->pluginFormatKnobs.formatChoice.lock(); |
| 2570 | |
| 2571 | if (!choice) { |
| 2572 | return; |
| 2573 | } |
| 2574 | int curIndex = choice->getValue(); |
| 2575 | choice->populateChoices(entries); |
| 2576 | choice->beginChanges(); |
| 2577 | choice->setDefaultValueWithoutApplying(defValue); |
| 2578 | if (!loadingProject) { |
| 2579 | //changedKnob was not called because we are initializing knobs |
| 2580 | handleFormatKnob( choice.get() ); |
| 2581 | } else { |
| 2582 | if ( curIndex < (int)entries.size() ) { |
| 2583 | choice->setValue(curIndex); |
| 2584 | } |
| 2585 | } |
| 2586 | |
| 2587 | choice->endChanges(); |
| 2588 | } |
| 2589 | |
| 2590 | void |
| 2591 | Node::refreshPreviewsAfterProjectLoad() |
no test coverage detected