Don't let invert selection, select edge chain, or marquee selection

work on hidden entities. Also fix bug where undo state wasn't saved
before toggling construction.

[git-p4: depot-paths = "//depot/solvespace/": change = 2067]
solver
Jonathan Westhues 2009-11-03 23:59:23 -08:00
parent c79604f64d
commit e91bf7db79
2 changed files with 5 additions and 1 deletions

View File

@ -175,6 +175,7 @@ void GraphicsWindow::SelectByMarquee(void) {
for(e = SK.entity.First(); e; e = SK.entity.NextAfter(e)) { for(e = SK.entity.First(); e; e = SK.entity.NextAfter(e)) {
if(e->group.v != SS.GW.activeGroup.v) continue; if(e->group.v != SS.GW.activeGroup.v) continue;
if(e->IsFace() || e->IsDistance()) continue; if(e->IsFace() || e->IsDistance()) continue;
if(!e->IsVisible()) continue;
if(e->IsPoint() || e->IsNormal()) { if(e->IsPoint() || e->IsNormal()) {
Vector p = e->IsPoint() ? e->PointGetNum() : Vector p = e->IsPoint() ? e->PointGetNum() :
@ -193,7 +194,7 @@ void GraphicsWindow::SelectByMarquee(void) {
ptMax = Vector::From(xmax, ymax, 1); ptMax = Vector::From(xmax, ymax, 1);
SEdgeList sel; SEdgeList sel;
ZERO(&sel); ZERO(&sel);
e->GenerateEdges(&sel); e->GenerateEdges(&sel, true);
SEdge *se; SEdge *se;
for(se = sel.l.First(); se; se = sel.l.NextAfter(se)) { for(se = sel.l.First(); se; se = sel.l.NextAfter(se)) {
Point2d ppa = ProjectPoint(se->a), Point2d ppa = ProjectPoint(se->a),

View File

@ -629,6 +629,7 @@ void GraphicsWindow::MenuEdit(int id) {
for(e = SK.entity.First(); e; e = SK.entity.NextAfter(e)) { for(e = SK.entity.First(); e; e = SK.entity.NextAfter(e)) {
if(e->group.v != SS.GW.activeGroup.v) continue; if(e->group.v != SS.GW.activeGroup.v) continue;
if(e->IsFace() || e->IsDistance()) continue; if(e->IsFace() || e->IsDistance()) continue;
if(!e->IsVisible()) continue;
SS.GW.ToggleSelectionStateOf(e->h); SS.GW.ToggleSelectionStateOf(e->h);
} }
@ -646,6 +647,7 @@ void GraphicsWindow::MenuEdit(int id) {
for(e = SK.entity.First(); e; e = SK.entity.NextAfter(e)) { for(e = SK.entity.First(); e; e = SK.entity.NextAfter(e)) {
if(e->group.v != SS.GW.activeGroup.v) continue; if(e->group.v != SS.GW.activeGroup.v) continue;
if(!e->HasEndpoints()) continue; if(!e->HasEndpoints()) continue;
if(!e->IsVisible()) continue;
Vector st = e->EndpointStart(), Vector st = e->EndpointStart(),
fi = e->EndpointFinish(); fi = e->EndpointFinish();
@ -861,6 +863,7 @@ c:
break; break;
case MNU_CONSTRUCTION: { case MNU_CONSTRUCTION: {
SS.UndoRemember();
SS.GW.GroupSelection(); SS.GW.GroupSelection();
int i; int i;
for(i = 0; i < SS.GW.gs.entities; i++) { for(i = 0; i < SS.GW.gs.entities; i++) {