From 4ed9d10174126c7574e0b43058fa3c0c23dd8407 Mon Sep 17 00:00:00 2001 From: David Vierra Date: Fri, 16 Sep 2016 03:58:21 -1000 Subject: [PATCH] Fix move tool adding spurious "Move Object" undos in many cases --- src/mcedit2/editortools/move.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mcedit2/editortools/move.py b/src/mcedit2/editortools/move.py index 801e411..4937e6f 100644 --- a/src/mcedit2/editortools/move.py +++ b/src/mcedit2/editortools/move.py @@ -144,6 +144,9 @@ class MoveTool(EditorTool): # --- Pending imports --- def importDidMove(self, newPoint, oldPoint): + if self.currentImport is None: + return + if newPoint != oldPoint: command = MoveOffsetCommand(oldPoint, newPoint, self.currentImport) self.editorSession.pushCommand(command)