From 607572701dead237f4ff729aba2fadc8453b4046 Mon Sep 17 00:00:00 2001 From: jfa Date: Fri, 20 Jan 2023 18:13:13 +0300 Subject: [PATCH] Option to show/hide axes now works also in default attributes mode --- src/LightApp/LightApp_Application.cxx | 6 +++--- src/OCCViewer/OCCViewer_ViewModel.cxx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index e84d52a59..49972104e 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -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 <> // ... "View cube default (OCCT) attributes" group <> @@ -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 <> // ... -> empty frame (for layout) <> diff --git a/src/OCCViewer/OCCViewer_ViewModel.cxx b/src/OCCViewer/OCCViewer_ViewModel.cxx index b3bb6b5c3..377664756 100644 --- a/src/OCCViewer/OCCViewer_ViewModel.cxx +++ b/src/OCCViewer/OCCViewer_ViewModel.cxx @@ -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)); -- 2.39.2