diff --git a/draw.cpp b/draw.cpp index baeb702..c811ab5 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 71af139..0ffdbad 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