Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Revert FilterConstraints includeStates(ActiveStates) to old behaviour
Browse files Browse the repository at this point in the history
    Old behaviour was to flip all states to on in the case that they
    were all off. The change should only be temporary since it is
    surprising - some changes to the code for the editor are necessary
    before this can be made more sensible.
  • Loading branch information
davidmason committed Jul 8, 2013
1 parent 60ae8a8 commit 18cef6f
Showing 1 changed file with 12 additions and 1 deletion.
Expand Up @@ -142,7 +142,18 @@ public Builder checkInTarget(boolean check)

public Builder includeStates(ActiveStates states)
{
this.states.fromStates(states);
//FIXME this behaviour is too surprising.
// It exists because the editor UI should show all states when either
// all or none of the states are checked. This logic should just happen
// in the editor backend *before* sending a request to the server.
if (states.hasNoStates())
{
this.states.allOn();
}
else
{
this.states.fromStates(states);
}
return this;
}

Expand Down

0 comments on commit 18cef6f

Please sign in to comment.