From 87c7d46cf9b76da151f7d3dd93cbd2982c9213d3 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Fri, 20 Mar 2020 15:15:21 +0200 Subject: [PATCH] Fixed District diagram viewer to allow moving of vertices again. The problem was caused by the default grid snap advisor which the base DiagramViewer injects into the canvas context, which had 1.0mm snap region. This removes the snap advisor entirely. gitlab #82 Change-Id: Ibbced0c118801266c15e1dae50f39fdee28cf0a6 (cherry picked from commit ff17be003806b0570ebd6f0017d27e99e31e0c24) --- .../simantics/district/network/ui/DistrictDiagramViewer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramViewer.java b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramViewer.java index 19838955..5b67fa51 100644 --- a/org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramViewer.java +++ b/org.simantics.district.network.ui/src/org/simantics/district/network/ui/DistrictDiagramViewer.java @@ -32,6 +32,7 @@ import org.simantics.district.network.visualisations.model.DynamicSizeContributi import org.simantics.district.network.visualisations.model.SizeBarOptions; import org.simantics.g2d.canvas.ICanvasContext; import org.simantics.g2d.canvas.impl.CanvasContext; +import org.simantics.g2d.diagram.DiagramHints; import org.simantics.g2d.diagram.handler.PickRequest.PickFilter; import org.simantics.g2d.diagram.participant.DelayedBatchElementPainter; import org.simantics.g2d.diagram.participant.ElementPainter; @@ -101,6 +102,7 @@ public class DistrictDiagramViewer extends DiagramViewer { h.setHint(PanZoomRotateHandler.KEY_ZOOM_IN_LIMIT, 10000.0); h.setHint(PanZoomRotateHandler.KEY_ZOOM_OUT_LIMIT, 0.01); h.setHint(DiagramModelHints.KEY_DIAGRAM_RESOURCE, diagramResource); + h.removeHint(DiagramHints.SNAP_ADVISOR); } @Override -- 2.47.1