Delete all entities on a workplane request that is being deleted.

Fixes #628.
pull/640/head
whitequark 2020-06-23 01:05:51 +00:00
parent d238f985fb
commit 586b0477d2
1 changed files with 9 additions and 1 deletions

View File

@ -954,9 +954,17 @@ void GraphicsWindow::ForceTextWindowShown() {
} }
void GraphicsWindow::DeleteTaggedRequests() { 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 // Rewrite any point-coincident constraints that were affected by this
// deletion. // deletion.
Request *r;
for(r = SK.request.First(); r; r = SK.request.NextAfter(r)) { for(r = SK.request.First(); r; r = SK.request.NextAfter(r)) {
if(!r->tag) continue; if(!r->tag) continue;
FixConstraintsForRequestBeingDeleted(r->h); FixConstraintsForRequestBeingDeleted(r->h);