projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Added destroy for GUIComponent and GUIWire
[Mograsim.git]
/
LogicUI
/
src
/
era
/
mi
/
gui
/
model
/
components
/
GUIComponent.java
diff --git
a/LogicUI/src/era/mi/gui/model/components/GUIComponent.java
b/LogicUI/src/era/mi/gui/model/components/GUIComponent.java
index
cf9b23a
..
e266afb
100644
(file)
--- a/
LogicUI/src/era/mi/gui/model/components/GUIComponent.java
+++ b/
LogicUI/src/era/mi/gui/model/components/GUIComponent.java
@@
-37,6
+37,12
@@
public abstract class GUIComponent
model.componentCreated(this);
}
+ public void destroy()
+ {
+ pins.forEach(p -> pinRemovedListeners.forEach(l -> l.accept(p)));
+ model.componentDestroyed(this);
+ }
+
public void moveTo(double x, double y)
{
bounds.x = x;