3D viewer: shows 3D shapes hide/show option in main menubar (Preferences)

Although these options are already in Preferences/Preferences/3D Viewer,
a direct access is useful because it avoid rebuilding the 3D scene, not needed
to hide/show 3D shapes.
This commit is contained in:
jean-pierre charras 2021-07-21 17:55:27 +02:00
parent 0525d50c58
commit 396213fa30
2 changed files with 14 additions and 0 deletions

View File

@ -118,7 +118,14 @@ void EDA_3D_VIEWER_FRAME::CreateMenuBar()
prefsMenu->AppendSeparator();
prefsMenu->Add( EDA_3D_ACTIONS::attributesTHT, ACTION_MENU::CHECK );
prefsMenu->Add( EDA_3D_ACTIONS::attributesSMD, ACTION_MENU::CHECK );
prefsMenu->Add( EDA_3D_ACTIONS::attributesVirtual, ACTION_MENU::CHECK );
prefsMenu->AppendSeparator();
prefsMenu->Add( EDA_3D_ACTIONS::showAxis, ACTION_MENU::CHECK );
prefsMenu->Add( EDA_3D_ACTIONS::showBoundingBoxes, ACTION_MENU::CHECK );
// Grid submenu
ACTION_MENU* gridSubmenu = new ACTION_MENU( false, tool );

View File

@ -202,6 +202,13 @@ void EDA_3D_VIEWER_FRAME::setupUIConditions()
RegisterUIUpdateHandler( ID_RENDER_CURRENT_VIEW,
ACTION_CONDITIONS().Check( raytracingCondition ) );
mgr->SetConditions( EDA_3D_ACTIONS::attributesTHT,
FlagCheck( FL_FP_ATTRIBUTES_NORMAL ) );
mgr->SetConditions( EDA_3D_ACTIONS::attributesSMD,
FlagCheck( FL_FP_ATTRIBUTES_NORMAL_INSERT ) );
mgr->SetConditions( EDA_3D_ACTIONS::attributesVirtual,
FlagCheck( FL_FP_ATTRIBUTES_VIRTUAL ) );
mgr->SetConditions( EDA_3D_ACTIONS::showBoundingBoxes,
FlagCheck( FL_RENDER_OPENGL_SHOW_MODEL_BBOX ) );
mgr->SetConditions( EDA_3D_ACTIONS::showAxis,