import org.simantics.g2d.diagram.handler.PickRequest;
import org.simantics.g2d.diagram.participant.AbstractDiagramParticipant;
import org.simantics.g2d.element.IElement;
-import org.simantics.maps.MapScalingTransform;
import org.simantics.scenegraph.g2d.G2DNode;
import org.simantics.scenegraph.g2d.G2DParentNode;
import org.simantics.utils.datastructures.hints.IHintContext.Key;
}
public boolean pickHoveredElement(Point2D currentMousePos) {
- PickRequest req = new PickRequest(currentMousePos.getX(), currentMousePos.getY());
+ PickRequest req = new PickRequest(currentMousePos.getX(), currentMousePos.getY()).context(getContext());
List<IElement> pickables = new ArrayList<IElement>();
pick.pick(diagram, req, pickables);
// Quite hackish solution..
boolean oldIgnore = le.getIgnoreFocusSettings();
le.setIgnoreFocusSettings(true);
- pick.pick(diagram, new PickRequest(canvasPosition.getX(), canvasPosition.getY()), result);
+ pick.pick(diagram, new PickRequest(canvasPosition.getX(), canvasPosition.getY()).context(ctx), result);
le.setIgnoreFocusSettings(oldIgnore);
boolean allow = false;