mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-25 22:18:48 -04:00
fixed highlight issue if elements are pasted
This commit is contained in:
parent
bfc094dc27
commit
8aa4270f94
@ -136,6 +136,7 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
Vector posVector = getPosVector(lastMousePos.x, lastMousePos.y);
|
||||
ArrayList<Moveable> elements = CircuitTransferable.createList(data, shapeFactory, posVector);
|
||||
if (elements != null) {
|
||||
removeHighLighted();
|
||||
mouseInsertList.activate(elements, posVector);
|
||||
}
|
||||
}
|
||||
@ -1261,7 +1262,7 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
|
||||
@Override
|
||||
void clicked(MouseEvent e) {
|
||||
if (elements != null) {
|
||||
if (elements != null && e.getButton() == 1) {
|
||||
for (Moveable m : elements) {
|
||||
if (m instanceof Wire)
|
||||
circuit.add((Wire) m);
|
||||
|
Loading…
x
Reference in New Issue
Block a user