From bc1075b55b15218d7bd37ebb401876e36af5726b Mon Sep 17 00:00:00 2001 From: epa Date: Fri, 20 Oct 2006 11:53:41 +0000 Subject: [PATCH] PAL13556: "Display only" option for new created objects and scalar bars --- resources/SalomeApp.xml | 15 ++++++++------- src/VISUGUI/VISU_msg_en.po | 3 +++ src/VISUGUI/VisuGUI.cxx | 4 ++++ src/VISUGUI/VisuGUI.h | 3 ++- src/VISUGUI/VisuGUI_Prs3dTools.h | 3 +++ 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/resources/SalomeApp.xml b/resources/SalomeApp.xml index 53be7b25..666ff6eb 100644 --- a/resources/SalomeApp.xml +++ b/resources/SalomeApp.xml @@ -4,13 +4,14 @@ - - - - - - - + + + + + + + + diff --git a/src/VISUGUI/VISU_msg_en.po b/src/VISUGUI/VISU_msg_en.po index b51fcdea..bc56f444 100644 --- a/src/VISUGUI/VISU_msg_en.po +++ b/src/VISUGUI/VISU_msg_en.po @@ -189,6 +189,9 @@ msgstr "Representation properties" msgid "VISU_USE_SHADING" msgstr "Use Shading" +msgid "VISU_DISP_ONLY" +msgstr "Display only on creation" + msgid "VISU_SHRINK" msgstr "Shrink" diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index df34877d..07efd2bc 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -3178,6 +3178,10 @@ void VisuGUI::createPreferences() addPreference( tr( "VISU_USE_SHADING" ), representGr, LightApp_Preferences::Bool, "VISU", "represent_shading" ); + addPreference( "", representGr, LightApp_Preferences::Space ); + + addPreference( tr( "VISU_DISP_ONLY" ), representGr, + LightApp_Preferences::Bool, "VISU", "display_only" ); } void VisuGUI::preferencesChanged( const QString& a, const QString& b) diff --git a/src/VISUGUI/VisuGUI.h b/src/VISUGUI/VisuGUI.h index 93c912eb..8c71e407 100644 --- a/src/VISUGUI/VisuGUI.h +++ b/src/VISUGUI/VisuGUI.h @@ -78,6 +78,7 @@ public: public slots: virtual bool deactivateModule( SUIT_Study* ); virtual bool activateModule( SUIT_Study* ); + virtual void OnEraseAll(); protected slots: void OnImportFromFile(); @@ -111,7 +112,7 @@ protected slots: virtual void OnDisplayPrs(); virtual void OnDisplayOnlyPrs(); virtual void OnErasePrs(); - virtual void OnEraseAll(); + // virtual void OnEraseAll(); void OnMakeSurfaceframe(); void OnMakeInsideframe(); diff --git a/src/VISUGUI/VisuGUI_Prs3dTools.h b/src/VISUGUI/VisuGUI_Prs3dTools.h index 62b46d51..4b093282 100644 --- a/src/VISUGUI/VisuGUI_Prs3dTools.h +++ b/src/VISUGUI/VisuGUI_Prs3dTools.h @@ -203,6 +203,9 @@ namespace VISU aViewWindow = GetViewWindow(theModule); // Display created presentation. if (aViewWindow) { + if(aResourceMgr->booleanValue("VISU","display_only",false)){ + theModule->OnEraseAll(); + } PublishInView(theModule, aPrs3d, aViewWindow, /*highlight = */true); aViewWindow->onFitAll(); -- 2.39.2