From e9649243165f1325f8b6703a66886ad6e10304fe Mon Sep 17 00:00:00 2001 From: David Vierra Date: Sun, 14 Feb 2016 05:17:59 -1000 Subject: [PATCH] Starting selections on nearby blocks no longer defaults to face Y+ --- src/mcedit2/handles/boxhandle.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mcedit2/handles/boxhandle.py b/src/mcedit2/handles/boxhandle.py index 4e19511..4d715ab 100644 --- a/src/mcedit2/handles/boxhandle.py +++ b/src/mcedit2/handles/boxhandle.py @@ -207,8 +207,12 @@ class BoxHandle(scenenode.Node, QtCore.QObject): # --- Create --- def beginCreate(self, event): + # If the distance to the block is too far, face selection becomes inconsistent + # and aggravating. Use YIncreasing if it is more than 50 blocks away. + distance = (event.blockPosition - event.ray.point).length() + self.dragStartPoint = event.blockPosition - self.dragStartFace = faces.FaceYIncreasing # event.blockFace + self.dragStartFace = faces.FaceYIncreasing if distance > 50 else event.blockFace self.isCreating = True def continueCreate(self, event):