diff --git a/src/graphicswin.cpp b/src/graphicswin.cpp index 16846d2..84e83d6 100644 --- a/src/graphicswin.cpp +++ b/src/graphicswin.cpp @@ -407,6 +407,8 @@ void GraphicsWindow::Init() { showEdges = true; showMesh = false; showOutlines = false; + showFacesDrawing = false; + showFacesNonDrawing = true; drawOccludedAs = DrawOccludedAs::INVISIBLE; showTextWindow = true; @@ -1366,6 +1368,14 @@ void GraphicsWindow::ToggleBool(bool *v) { SS.GenerateAll(SolveSpaceUI::Generate::UNTIL_ACTIVE); } + if(v == &showFaces) { + if(g->type == Group::Type::DRAWING_WORKPLANE || g->type == Group::Type::DRAWING_3D) { + showFacesDrawing = showFaces; + } else { + showFacesNonDrawing = showFaces; + } + } + Invalidate(/*clearPersistent=*/true); SS.ScheduleShowTW(); } diff --git a/src/group.cpp b/src/group.cpp index 438d510..1fcbded 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -416,11 +416,10 @@ std::string Group::DescriptionString() { } void Group::Activate() { - if(type == Type::EXTRUDE || type == Type::LINKED || type == Type::LATHE || - type == Type::REVOLVE || type == Type::HELIX || type == Type::TRANSLATE || type == Type::ROTATE) { - SS.GW.showFaces = true; + if(type == Type::DRAWING_WORKPLANE || type == Type::DRAWING_3D) { + SS.GW.showFaces = SS.GW.showFacesDrawing; } else { - SS.GW.showFaces = false; + SS.GW.showFaces = SS.GW.showFacesNonDrawing; } SS.MarkGroupDirty(h); // for good measure; shouldn't be needed SS.ScheduleShowTW(); diff --git a/src/ui.h b/src/ui.h index 359ad40..ace4ddd 100644 --- a/src/ui.h +++ b/src/ui.h @@ -802,6 +802,8 @@ public: bool showEdges; bool showOutlines; bool showFaces; + bool showFacesDrawing; + bool showFacesNonDrawing; bool showMesh; void ToggleBool(bool *v);