Disallow vertex snapping when used with modifier keys not bound to vertex snap

[CL 2248470 by Matt Kuhlenschmidt in Main branch]
This commit is contained in:
Matt Kuhlenschmidt
2014-08-08 10:18:03 -04:00
committed by UnrealBot
parent 21a6cdca5d
commit d344ffaec4

View File

@@ -131,10 +131,9 @@ bool FEditorViewportSnapping::IsSnapToVertexEnabled()
const FInputGesture& Gesture = *Commands.HoldToEnableVertexSnapping->GetActiveGesture();
// Note the gesture is allowed to pass if modifier keys are pressed but the gesture doesnt require them to be pressed. This is so multiple actions can be combined with vertex snap
return (!Gesture.bCtrl || GCurrentLevelEditingViewportClient->IsCtrlPressed() )
&& (!Gesture.bAlt || GCurrentLevelEditingViewportClient->IsAltPressed() )
&& (!Gesture.bShift || GCurrentLevelEditingViewportClient->IsShiftPressed() )
return (Gesture.bCtrl == GCurrentLevelEditingViewportClient->IsCtrlPressed() )
&& (Gesture.bAlt == GCurrentLevelEditingViewportClient->IsAltPressed() )
&& (Gesture.bShift == GCurrentLevelEditingViewportClient->IsShiftPressed() )
&& GCurrentLevelEditingViewportClient->Viewport->KeyState(Gesture.Key) == true;
}
else