Fixed an issue with new focus gaining, see #308

This commit is contained in:
hneemann 2019-08-18 21:28:41 +02:00
parent 9c1dd4961b
commit 44d3073af1

View File

@ -1335,7 +1335,7 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
@Override
public void mousePressed(MouseEvent e) {
hadFocusAtClick = hasFocus();
hadFocusAtClick = SwingUtilities.getWindowAncestor(CircuitComponent.this).isFocused();
pos = new Vector(e.getX(), e.getY());
isMoved = false;
requestFocusInWindow();