From 3da0f6e135e6f9d8c574d62c085ad8d0517babc8 Mon Sep 17 00:00:00 2001 From: Jonathan Westhues Date: Wed, 7 Oct 2009 22:48:49 -0800 Subject: [PATCH] Oops, couldn't select the faces in groups that didn't contribute thisShell or thisMesh; forgot about that when I did the change to not re-triangulate shells (or re-edge-find meshes) unnecessarily. [git-p4: depot-paths = "//depot/solvespace/": change = 2049] --- draw.cpp | 9 ++++++++- groupmesh.cpp | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/draw.cpp b/draw.cpp index baeb7020..c811ab56 100644 --- a/draw.cpp +++ b/draw.cpp @@ -227,7 +227,14 @@ void GraphicsWindow::HitTestMakeSelection(Point2d mp) { // Faces, from the triangle mesh; these are lowest priority if(s.constraint.v == 0 && s.entity.v == 0 && showShaded && showFaces) { - SMesh *m = &((SK.GetGroup(activeGroup))->displayMesh); + SMesh *m; + Group *g = SK.GetGroup(activeGroup), + *pg = g->RunningMeshGroup(); + if(pg && g->thisMesh.IsEmpty() && g->thisShell.IsEmpty()) { + m = &(pg->displayMesh); + } else { + m = &(g->displayMesh); + } DWORD v = m->FirstIntersectionWith(mp); if(v) { s.entity.v = v; diff --git a/groupmesh.cpp b/groupmesh.cpp index 71af139a..0ffdbad5 100644 --- a/groupmesh.cpp +++ b/groupmesh.cpp @@ -397,6 +397,8 @@ void Group::Draw(void) { // can control this stuff independently, with show/hide solids, edges, // mesh, etc. + // If this changes then make sure to also do the face selection off the + // correct mesh, in draw.cpp. Group *pg = RunningMeshGroup(); if(pg && thisMesh.IsEmpty() && thisShell.IsEmpty()) { // We don't contribute any new solid model in this group, so our