Skip to content

Commit

Permalink
Merge: fix double horizontal separator
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKepzie committed Nov 15, 2016
1 parent aff10fd commit f60d256
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Engine/Node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4069,9 +4069,15 @@ Node::initializeDefaultKnobs(bool loadingSerialization)
for (KnobsVec::iterator it = mainPageChildren.begin(); it != mainPageChildren.end(); ++it, ++i) {
if (*it == lastKnobBeforeAdvancedOption) {
if (i > 0) {
int j = i - 1;
KnobsVec::iterator prev = it;
--prev;
if ( !dynamic_cast<KnobSeparator*>( prev->get() ) ) {
while (j >= 0 && (*prev)->getIsSecret()) {
--j;
--prev;
}

if ( j >= 0 && !dynamic_cast<KnobSeparator*>( prev->get() ) ) {
boost::shared_ptr<KnobSeparator> sep = AppManager::createKnob<KnobSeparator>(_imp->effect.get(), std::string(), 1, false);
sep->setName("advancedSep");
mainPage->insertKnob(i, sep);
Expand Down

0 comments on commit f60d256

Please sign in to comment.