Fix disabling of autoconstrainter via Ctrl.

This commit is contained in:
whitequark 2016-06-11 22:26:36 +00:00
parent fb2f32eb72
commit ce656ef7c6

View File

@ -892,6 +892,9 @@ void GraphicsWindow::MouseLeftDown(double mx, double my) {
if(ToolbarMouseDown((int)mx, (int)my)) return; if(ToolbarMouseDown((int)mx, (int)my)) return;
} }
// This will be clobbered by MouseMoved below.
SuggestedConstraint constraintSuggestion = SS.GW.pending.suggestion;
// Make sure the hover is up to date. // Make sure the hover is up to date.
MouseMoved(mx, my, false, false, false, false, false); MouseMoved(mx, my, false, false, false, false, false);
orig.mouse.x = mx; orig.mouse.x = mx;
@ -1127,8 +1130,8 @@ void GraphicsWindow::MouseLeftDown(double mx, double my) {
case DRAGGING_NEW_LINE_POINT: { case DRAGGING_NEW_LINE_POINT: {
// Constrain the line segment horizontal or vertical if close enough // Constrain the line segment horizontal or vertical if close enough
if(SS.GW.pending.suggestion != SUGGESTED_NONE) { if(constraintSuggestion != SUGGESTED_NONE) {
Constraint::Constrain(SS.GW.pending.suggestion, Constraint::Constrain(constraintSuggestion,
Entity::NO_ENTITY, Entity::NO_ENTITY, pending.request.entity(0)); Entity::NO_ENTITY, Entity::NO_ENTITY, pending.request.entity(0));
} }