From 745a12c3c428dd080f55d1c47916a72dd8a6da87 Mon Sep 17 00:00:00 2001 From: robnee Date: Sat, 6 Feb 2021 12:37:48 -0500 Subject: [PATCH] permit construction geometry toggle while drawing --- src/graphicswin.cpp | 14 ++++++++++++++ src/mouse.cpp | 1 + 2 files changed, 15 insertions(+) diff --git a/src/graphicswin.cpp b/src/graphicswin.cpp index 32b4b082..a7d44f12 100644 --- a/src/graphicswin.cpp +++ b/src/graphicswin.cpp @@ -1304,6 +1304,20 @@ c: break; case Command::CONSTRUCTION: { + // if we are drawing + if(SS.GW.pending.operation == Pending::DRAGGING_NEW_POINT || + SS.GW.pending.operation == Pending::DRAGGING_NEW_LINE_POINT || + SS.GW.pending.operation == Pending::DRAGGING_NEW_ARC_POINT || + SS.GW.pending.operation == Pending::DRAGGING_NEW_CUBIC_POINT || + SS.GW.pending.operation == Pending::DRAGGING_NEW_RADIUS) { + for(auto &hr : SS.GW.pending.requests) { + Request* r = SK.GetRequest(hr); + r->construction = !(r->construction); + SS.MarkGroupDirty(r->group); + } + SS.GW.Invalidate(); + break; + } SS.GW.GroupSelection(); if(SS.GW.gs.entities == 0) { Error(_("No entities are selected. Select entities before " diff --git a/src/mouse.cpp b/src/mouse.cpp index 263211da..9c0f56ee 100644 --- a/src/mouse.cpp +++ b/src/mouse.cpp @@ -1042,6 +1042,7 @@ void GraphicsWindow::MouseLeftDown(double mx, double my, bool shiftDown, bool ct ConstrainPointByHovered(hr.entity(1), &mouse); ClearSuper(); + AddToPending(hr); pending.operation = Pending::DRAGGING_NEW_RADIUS; pending.circle = hr.entity(0);