]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Option to show/hide axes now works also in default attributes mode jfa/view_cube
authorjfa <jfa@opencascade.com>
Fri, 20 Jan 2023 15:13:13 +0000 (18:13 +0300)
committerjfa <jfa@opencascade.com>
Fri, 20 Jan 2023 15:13:13 +0000 (18:13 +0300)
src/LightApp/LightApp_Application.cxx
src/OCCViewer/OCCViewer_ViewModel.cxx

index e84d52a59cb7f27dcbc7fd6479cc355832455a6d..49972104e670860d5d1f733e978ac0b3e0d199b7 100644 (file)
@@ -2867,6 +2867,9 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   pref->setItemProperty( "min", 0.1, viewcube_dur );
   pref->setItemProperty( "max", 10.0, viewcube_dur );
   pref->setItemProperty( "step", 0.1, viewcube_dur );
+  // .... -> show view cube axes
+  pref->addPreference( tr( "PREF_VIEWCUBE_AXES" ), occViewCubeGroup,
+               LightApp_Preferences::Bool, "OCCViewer", "viewcube_axes" );
   // ... "View cube" group <<end>>
 
   // ... "View cube default (OCCT) attributes" group <<start>>
@@ -2885,9 +2888,6 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   // .... -> text color
   pref->addPreference( tr( "PREF_VIEWCUBE_TEXTCOLOR" ), occViewCubeAttrsGroup,
                LightApp_Preferences::Color, "OCCViewer", "viewcube_text_color" );
-  // .... -> show view cube axes
-  pref->addPreference( tr( "PREF_VIEWCUBE_AXES" ), occViewCubeAttrsGroup,
-               LightApp_Preferences::Bool, "OCCViewer", "viewcube_axes" );
   // ... "View cube" group <<end>>
 
   // ... -> empty frame (for layout) <<start>>
index b3bb6b5c37db898d2139e1c6d66fe5afe6d633ec..3776647560d80a1bc1be0de1f904d68264af6afd 100644 (file)
@@ -1380,14 +1380,14 @@ void OCCViewer_Viewer::setViewCubeParamsFromPreferences()
     // Text color
     aColor = resMgr->colorValue("OCCViewer", "viewcube_text_color", QColor(0, 0, 0));
     myViewCube->SetTextColor(OCCViewer::color(aColor));
-
-    // Axes
-    myViewCube->SetDrawAxes(resMgr->booleanValue("OCCViewer", "viewcube_axes", true));
   }
   else {
     myViewCube->ResetStyles();
   }
 
+  // Axes
+  myViewCube->SetDrawAxes(resMgr->booleanValue("OCCViewer", "viewcube_axes", false));
+
   // Animation duration (sec)
   myViewCube->SetDuration(resMgr->doubleValue("OCCViewer", "viewcube_duration", 0.5));