projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed ViewModels being modifiable via GUIComponent/Wire#destroy.
[Mograsim.git]
/
net.mograsim.logic.model
/
src
/
net
/
mograsim
/
logic
/
model
/
model
/
wires
/
GUIWire.java
diff --git
a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/GUIWire.java
b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/GUIWire.java
index
99241a3
..
8b91fc4
100644
(file)
--- a/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/GUIWire.java
+++ b/
net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/GUIWire.java
@@
-252,18
+252,18
@@
public class GUIWire
recalculateEffectivePath();
recalculateEffectivePath();
- model.wireCreated(this);
+ model.wireCreated(this
, this::destroyed
);
}
/**
}
/**
- * Destroys this wire. This method i
mplicitly calls {@link ViewModelModifiable#wireDestroyed(GUIWire) wireDestroyed()} for the model
- *
this component
is a part of.
+ * Destroys this wire. This method i
s called from {@link ViewModelModifiable#wireDestroyed(GUIWire) wireDestroyed()} of the model this
+ *
wire
is a part of.
*
* @author Daniel Kirschten
*/
*
* @author Daniel Kirschten
*/
- p
ublic void destroy
()
+ p
rivate void destroyed
()
{
{
- model.wireDestroyed(this);
+ // nothing to do
}
// pins
}
// pins