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]
solver
Jonathan Westhues 2009-10-07 22:48:49 -08:00
parent 15729c74f0
commit 3da0f6e135
2 changed files with 10 additions and 1 deletions

View File

@ -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;

View File

@ -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