Skip to content

Commit

Permalink
Merge pull request #99 from DecwLK/start_state_on_remove_fix
Browse files Browse the repository at this point in the history
fixed bug where states were not removed from automaton on delete
  • Loading branch information
crissNb authored Feb 12, 2024
2 parents fd71083 + d6298d8 commit 3a55b84
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class DeleteStateViewModelElementAction extends AbstractPositionableViewM
private final StateViewModel stateViewModel;
private final Automaton automaton;
private final SystemViewModel systemViewModel;
private boolean wasStartState;
private final boolean wasStartState;

DeleteStateViewModelElementAction(
GeckoViewModel geckoViewModel, StateViewModel stateViewModel, SystemViewModel systemViewModel) {
Expand Down Expand Up @@ -56,6 +56,7 @@ boolean run() throws GeckoException {
systemViewModel.setStartState(null);
}
systemViewModel.updateTarget();
automaton.removeState(stateViewModel.getTarget());
geckoViewModel.deleteViewModelElement(stateViewModel);
return true;
}
Expand Down

0 comments on commit 3a55b84

Please sign in to comment.