From 586b0477d2be31b2ac24c351f5eeeb90f86a7c2b Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 23 Jun 2020 01:05:51 +0000 Subject: [PATCH] Delete all entities on a workplane request that is being deleted. Fixes #628. --- src/graphicswin.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/graphicswin.cpp b/src/graphicswin.cpp index 95a4ad02..bc4e485f 100644 --- a/src/graphicswin.cpp +++ b/src/graphicswin.cpp @@ -954,9 +954,17 @@ void GraphicsWindow::ForceTextWindowShown() { } void GraphicsWindow::DeleteTaggedRequests() { + Request *r; + // Delete any requests that were affected by this deletion. + for(r = SK.request.First(); r; r = SK.request.NextAfter(r)) { + if(r->workplane == Entity::FREE_IN_3D) continue; + if(!r->workplane.isFromRequest()) continue; + Request *wrkpl = SK.GetRequest(r->workplane.request()); + if(wrkpl->tag) + r->tag = 1; + } // Rewrite any point-coincident constraints that were affected by this // deletion. - Request *r; for(r = SK.request.First(); r; r = SK.request.NextAfter(r)) { if(!r->tag) continue; FixConstraintsForRequestBeingDeleted(r->h);