Skip to content
Snippets Groups Projects
Commit df33a13a authored by Dominique Blouin's avatar Dominique Blouin
Browse files

Code cleanup

parent 5a50f2e3
No related branches found
No related tags found
No related merge requests found
package ui; package ui;
import java.awt.Cursor;
import java.awt.MouseInfo;
import java.awt.event.KeyEvent; import java.awt.event.KeyEvent;
import java.awt.event.KeyListener; import java.awt.event.KeyListener;
...@@ -63,18 +61,16 @@ public class PanelKeyListener implements KeyListener { ...@@ -63,18 +61,16 @@ public class PanelKeyListener implements KeyListener {
@Override @Override
public void keyReleased(KeyEvent arg0) { public void keyReleased(KeyEvent arg0) {
if (!arg0.isShiftDown()) if ( !arg0.isShiftDown() && tdp.mode == TDiagramPanel.MOVING_SELECTED_COMPONENTS ) {
if (tdp.mode == TDiagramPanel.MOVING_SELECTED_COMPONENTS) { tdp.showSelectionZone(tdp.currentX, tdp.currentY);
tdp.showSelectionZone(tdp.currentX, tdp.currentY); tdp.mode = TDiagramPanel.SELECTED_COMPONENTS;
tdp.mode = TDiagramPanel.SELECTED_COMPONENTS; tdp.setStopMovingSelectedComponents();
tdp.setStopMovingSelectedComponents(); tdp.getGUI().changeMade(tdp, TDiagramPanel.MOVE_COMPONENT);
tdp.getGUI().changeMade(tdp, TDiagramPanel.MOVE_COMPONENT); tdp.repaint();
tdp.repaint(); }
}
} }
@Override @Override
public void keyTyped(KeyEvent arg0) { public void keyTyped(KeyEvent arg0) {
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment