From 26429505cfbb5d99b3946c4caf661861ecc5f85e Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Sun, 12 Apr 2020 23:41:42 +0200 Subject: [PATCH] Editor: Created a constant for fast switching between snap 2.5 and 5 --- .../src/net/mograsim/logic/model/editor/Editor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/Editor.java b/plugins/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/Editor.java index b58c9470..55f5805e 100644 --- a/plugins/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/Editor.java +++ b/plugins/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/Editor.java @@ -32,6 +32,7 @@ import net.mograsim.logic.model.snippets.symbolrenderers.DefaultSymbolRenderer; public final class Editor { + private static final boolean FINE_SNAP = true; final Selection selection = new Selection(); final Set copyBuffer = new HashSet<>(); public final DeserializedSubmodelComponent toBeEdited; @@ -41,7 +42,7 @@ public final class Editor public final StateManager stateManager; private final SaveLoadManager saveManager; private Snapping snapping = Snapping.ABSOLUTE; - private double snapX = 5, snapY = 5; + private double snapX = FINE_SNAP ? 2.5 : 5, snapY = snapX; public final DialogManager dialogManager; public final EditorUserInput userInput; -- 2.17.1