|
@@ -170,6 +170,7 @@ public class GUI<E> implements CategoryListener {
|
|
|
private int xTHIS;
|
|
|
private int yBTHIS;
|
|
|
private int xBTHIS;
|
|
|
+ private CpsObject temp = null;
|
|
|
|
|
|
/**
|
|
|
* Create the application.
|
|
@@ -661,7 +662,10 @@ public class GUI<E> implements CategoryListener {
|
|
|
canvas.addMouseListener(new MouseAdapter() {
|
|
|
@Override
|
|
|
public void mousePressed(MouseEvent e) {
|
|
|
- CpsObject temp = getActualCps();
|
|
|
+ if(temp == null || temp.getID() != model.getSelectedObjectID()){
|
|
|
+ unitGraph.empty();
|
|
|
+ }
|
|
|
+ temp = getActualCps();
|
|
|
// Update of the Information about the HolonElements - only for
|
|
|
if (temp instanceof HolonObject) {
|
|
|
refreshTableHolonElement();
|
|
@@ -730,9 +734,6 @@ public class GUI<E> implements CategoryListener {
|
|
|
} else if (getActualCps() == null) {
|
|
|
deleteRows();
|
|
|
}
|
|
|
- if(model.getSelectedObjectID() == 0){
|
|
|
- unitGraph.empty();
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
});
|