Always skip pruning if there exist alternative enabled solutions

This commit is contained in:
Robert Haschke 2021-11-19 06:49:30 +01:00
parent c617e3353d
commit 718170ab1e

View File

@ -148,8 +148,8 @@ void ContainerBasePrivate::setStatus(const InterfaceState* s, InterfaceState::St
if (s->priority().status() == status)
return; // nothing changing
// if we should disable the state, only do so when there is no enabled alternative path
if (status == InterfaceState::PRUNED) {
// Skip disabling the state, if there are alternative enabled solutions
if (status != InterfaceState::ENABLED) {
auto solution_is_enabled = [](auto&& solution) {
return state<opposite<dir>()>(*solution)->priority().enabled();
};