projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Stopped creation of unneccessary Rectangle instances
[Mograsim.git]
/
net.mograsim.logic.ui
/
src
/
net
/
mograsim
/
logic
/
ui
/
model
/
wires
/
Pin.java
diff --git
a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/wires/Pin.java
b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/wires/Pin.java
index
9be0800
..
a6c40dd
100644
(file)
--- a/
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/wires/Pin.java
+++ b/
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/wires/Pin.java
@@
-5,7
+5,6
@@
import java.util.List;
import java.util.function.Consumer;
import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
import java.util.function.Consumer;
import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
-import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
import net.mograsim.logic.ui.model.components.GUIComponent;
public class Pin
import net.mograsim.logic.ui.model.components.GUIComponent;
public class Pin
@@
-51,8
+50,7
@@
public class Pin
public Point getPos()
{
public Point getPos()
{
- Rectangle componentBounds = component.getBounds();
- return new Point(relX + componentBounds.x, relY + componentBounds.y);
+ return new Point(relX + component.getPosX(), relY + component.getPosY());
}
protected void setRelPos(double relX, double relY)
}
protected void setRelPos(double relX, double relY)