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 // Faces, from the triangle mesh; these are lowest priority
if(s.constraint.v == 0 && s.entity.v == 0 && showShaded && showFaces) { 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); DWORD v = m->FirstIntersectionWith(mp);
if(v) { if(v) {
s.entity.v = 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, // can control this stuff independently, with show/hide solids, edges,
// mesh, etc. // mesh, etc.
// If this changes then make sure to also do the face selection off the
// correct mesh, in draw.cpp.
Group *pg = RunningMeshGroup(); Group *pg = RunningMeshGroup();
if(pg && thisMesh.IsEmpty() && thisShell.IsEmpty()) { if(pg && thisMesh.IsEmpty() && thisShell.IsEmpty()) {
// We don't contribute any new solid model in this group, so our // We don't contribute any new solid model in this group, so our