File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ class SlicePlane {
7373 void updateWidgetEnabled ();
7474};
7575
76- SlicePlane* addSceneSlicePlane ();
76+ SlicePlane* addSceneSlicePlane (bool initiallyVisible= false );
7777void removeLastSceneSlicePlane ();
7878void buildSlicePlaneGUI ();
7979
Original file line number Diff line number Diff line change @@ -20,10 +20,14 @@ std::vector<SlicePlane*> sceneSlicePlanes;
2020// Storage for global options
2121bool openSlicePlaneMenu = false ;
2222
23- SlicePlane* addSceneSlicePlane () {
23+ SlicePlane* addSceneSlicePlane (bool initiallyVisible ) {
2424 size_t nPlanes = sceneSlicePlanes.size ();
2525 std::string newName = " Scene Slice Plane " + std::to_string (nPlanes);
2626 sceneSlicePlanes.emplace_back (new SlicePlane (newName));
27+ if (!initiallyVisible) {
28+ sceneSlicePlanes.back ()->setDrawPlane (false );
29+ sceneSlicePlanes.back ()->setDrawWidget (false );
30+ }
2731 return sceneSlicePlanes.back ();
2832}
2933
@@ -43,7 +47,7 @@ void buildSlicePlaneGUI() {
4347 }
4448 if (ImGui::TreeNode (" Slice Planes" )) {
4549 if (ImGui::Button (" Add plane" )) {
46- addSceneSlicePlane ();
50+ addSceneSlicePlane (true );
4751 }
4852 ImGui::SameLine ();
4953 if (ImGui::Button (" Remove plane" )) {
You can’t perform that action at this time.
0 commit comments