|
@@ -61,10 +61,7 @@ class MyCanvas extends JPanel implements MouseListener, MouseMotionListener {
|
|
|
@Override
|
|
|
public void actionPerformed(ActionEvent e) {
|
|
|
// Remove the selected Object object
|
|
|
- model.getObjectsOnCanvas().remove(tempCps);
|
|
|
- for (CpsObject cps : model.getObjectsOnCanvas()) {
|
|
|
- cps.getConnectedTo().remove(tempCps);
|
|
|
- }
|
|
|
+ controller.deleteObjectOnCanvas(tempCps);
|
|
|
tempCps = null;
|
|
|
selectRect.setRect(0, 0, 0, 0);
|
|
|
repaint();
|