Skip to content

Commit

Permalink
Prevent stairs toggle from being unset when searching again
Browse files Browse the repository at this point in the history
not the best solution, but it will work for now
  • Loading branch information
ad1217 committed Mar 3, 2017
1 parent 3f05041 commit 9d74f75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/app/display/PatientController.java
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,11 @@ public void search () {
String search = searchBar.getText();
if (displayState != state.PATIENT_SEARCH){ //|| search.equals("")){
clearSearchDisplay();
// Don't lose stairs toggle state across searches
// Pretty hacky fix
boolean stairsToggle = togStairs.isSelected();
revertState(memento);
togStairs.setSelected(stairsToggle);
// startSearch();
displayState = state.PATIENT_SEARCH;
System.out.println("Starting display");
Expand Down

0 comments on commit 9d74f75

Please sign in to comment.