Skip to content
Permalink
Browse files

Clear path highlight on exit of Pathframe. Fix NPE when dragging

direction arrow.
  • Loading branch information...
pete_ pete_
pete_ authored and pete_ committed May 28, 2019
1 parent 2a0fb41 commit 56f71f0a3af3c81a4297a4fa065f78a91e3a4004
@@ -1586,14 +1586,15 @@ public boolean doMouseDragged(Positionable selection, MouseEvent event) {
if (_editCircuitFrame != null || _editPathsFrame != null) {
return true; // no dragging when editing
}
if (_editPortalFrame != null || _editDirectionFrame != null) {
if (selection instanceof PortalIcon) {
if (selection instanceof PortalIcon) {
if (_editPortalFrame != null) {
_editPortalFrame.setSelected((PortalIcon)selection);
return false; // OK to drag portal icon
} else if (_editDirectionFrame != null) {
return false; // OK to drag portal arrow
}
return true;
}
return false;
return true;
}

/**
@@ -862,6 +862,7 @@ private void closingEvent(boolean close) {
}
}
clearPath();
clearListSelection();
_parent.closePathFrame(_block);
_loc = getLocation(_loc);
_dim = getSize(_dim);
@@ -308,8 +308,8 @@ private void deletePortal() {
portal.dispose();
_portalList.dataChange();
_portalName.setText(null);
_currentPortalName = null;
case 1:
_currentPortalName = null;
PortalIcon icon = _parent.getPortalIconMap().get(name);
if (icon != null) {
deletePortalIcon(icon);

0 comments on commit 56f71f0

Please sign in to comment.
You can’t perform that action at this time.