Skip to content

Commit

Permalink
post creation defaults to selection mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mfansler committed Apr 28, 2015
1 parent cc86085 commit 4508d8e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/edu/millersville/cs/bitsplease/view/UMLEditorPane.java
Original file line number Diff line number Diff line change
Expand Up @@ -248,18 +248,22 @@ public void handle(MouseEvent e) {
case CREATE_CLASS:
UMLClassSymbol c = new UMLClassSymbol(new Point2D(e.getX()-85,e.getY()-60), 100, 100);
documentViewPane.addUMLSymbol(c);
toolbarPane.setCurrentEditorMode(UMLEditorMode.SELECT);
break;
case CREATE_INTERFACE:
UMLInterfaceSymbol i = new UMLInterfaceSymbol(new Point2D(e.getX() -85, e.getY() -40));
documentViewPane.addUMLSymbol(i);
documentViewPane.addUMLSymbol(i);
toolbarPane.setCurrentEditorMode(UMLEditorMode.SELECT);
break;
case CREATE_USER:
UMLUserSymbol u = new UMLUserSymbol(new Point2D(e.getX()-50,e.getY()-20));
documentViewPane.addUMLSymbol(u);
toolbarPane.setCurrentEditorMode(UMLEditorMode.SELECT);
break;
case CREATE_USE_CASE:
UMLUseCaseSymbol use = new UMLUseCaseSymbol(new Point2D(e.getX()-85, e.getY()-30));
documentViewPane.addUMLSymbol(use);
toolbarPane.setCurrentEditorMode(UMLEditorMode.SELECT);
break;
case DELETE:
documentViewPane.setSelectedUMLSymbol(null);
Expand Down Expand Up @@ -336,6 +340,7 @@ public void handle(MouseEvent e) {
new UMLRelationSymbol(dragTarget,
dragRelease,
toolbarPane.getCurrentEditorMode().getValue().getRelationType()));
toolbarPane.setCurrentEditorMode(UMLEditorMode.SELECT);
}
}
break;
Expand Down

0 comments on commit 4508d8e

Please sign in to comment.