permit construction geometry toggle while drawing

pull/944/head
robnee 2021-02-06 12:37:48 -05:00 committed by phkahler
parent 47c3209b48
commit 745a12c3c4
2 changed files with 15 additions and 0 deletions

View File

@ -1304,6 +1304,20 @@ c:
break; break;
case Command::CONSTRUCTION: { 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(); SS.GW.GroupSelection();
if(SS.GW.gs.entities == 0) { if(SS.GW.gs.entities == 0) {
Error(_("No entities are selected. Select entities before " Error(_("No entities are selected. Select entities before "

View File

@ -1042,6 +1042,7 @@ void GraphicsWindow::MouseLeftDown(double mx, double my, bool shiftDown, bool ct
ConstrainPointByHovered(hr.entity(1), &mouse); ConstrainPointByHovered(hr.entity(1), &mouse);
ClearSuper(); ClearSuper();
AddToPending(hr);
pending.operation = Pending::DRAGGING_NEW_RADIUS; pending.operation = Pending::DRAGGING_NEW_RADIUS;
pending.circle = hr.entity(0); pending.circle = hr.entity(0);