@@ -158,12 +158,12 @@ void StagePrivate::setStatus(const InterfaceState* s, InterfaceState::Status sta
158158 s->owner ()->updatePriority (const_cast <InterfaceState*>(s), InterfaceState::Priority (s->priority (), status));
159159
160160 // To break symmetry between both ends of a partial solution sequence that gets disabled,
161- // we mark the start state with START and all other states down the tree with END .
162- // This allows us to re-enable the START side, while not (yet) consider the END side ,
163- // when a new states arrives in a Connecting stage.
164- // The END side is only re-enabled if the START side actually was connected with a solution .
165- if (status == InterfaceState::Status::DISABLED_START )
166- status = InterfaceState::Status::DISABLED_END ; // ensure that only the first state is marked as START
161+ // we mark the first state with DISABLED_FAILED and all other states down the tree only with DISABLED .
162+ // This allows us to re-enable the FAILED side, while not (yet) consider the DISABLED states again ,
163+ // when new states arrive in a Connecting stage.
164+ // All DISABLED states are only re-enabled if the FAILED state actually gets connected.
165+ if (status == InterfaceState::DISABLED_FAILED )
166+ status = InterfaceState::DISABLED ; // only the first state is marked as FAILED
167167
168168 // traverse solution tree
169169 for (const SolutionBase* successor : trajectories<dir>(s))
@@ -729,7 +729,7 @@ ConnectingPrivate::StatePair ConnectingPrivate::make_pair<Interface::FORWARD>(In
729729template <Interface::Direction other>
730730void ConnectingPrivate::newState (Interface::iterator it, bool updated) {
731731 if (updated) { // many pairs might be affected: resort
732- if (it->priority ().status () == InterfaceState::Status::DISABLED_END )
732+ if (it->priority ().status () == InterfaceState::DISABLED )
733733 // remove all pending pairs involving this state
734734 pending.remove_if ([it](const StatePair& p) { return std::get<opposite<other>()>(p) == it; });
735735 else
@@ -738,10 +738,10 @@ void ConnectingPrivate::newState(Interface::iterator it, bool updated) {
738738 assert (it->priority ().enabled ()); // new solutions are feasible, aren't they?
739739 InterfacePtr other_interface = pullInterface (other);
740740 for (Interface::iterator oit = other_interface->begin (), oend = other_interface->end (); oit != oend; ++oit) {
741- // Don't re-enable states that are marked DISABLED_END
741+ // Don't re-enable states that are marked DISABLED
742742 if (static_cast <Connecting*>(me_)->compatible (*it, *oit)) {
743- // re-enable the opposing state oit if its status is DISABLED_START
744- if (oit->priority ().status () == InterfaceState::DISABLED_START )
743+ // re-enable the opposing state oit if its status is DISABLED_FAILED
744+ if (oit->priority ().status () == InterfaceState::DISABLED_FAILED )
745745 oit->owner ()->updatePriority (&*oit, InterfaceState::Priority (oit->priority (), InterfaceState::ENABLED));
746746 pending.insert (make_pair<other>(it, oit));
747747 }
0 commit comments