]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for IPAL12374.
authormzn <mzn@opencascade.com>
Fri, 21 Jul 2006 09:58:24 +0000 (09:58 +0000)
committermzn <mzn@opencascade.com>
Fri, 21 Jul 2006 09:58:24 +0000 (09:58 +0000)
src/VISU_I/VISU_DeformedShape_i.cc
src/VISU_I/VISU_DeformedShape_i.hh
src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc
src/VISU_I/VISU_ScalarMap_i.cc
src/VISU_I/VISU_ScalarMap_i.hh
src/VISU_I/VISU_StreamLines_i.cc

index 7f9b4b7fc5f4826286da927fa5f5ff2b57b3f5ad..8c2920dccd005ea1c7522027ecdfe7e0e527fbb9 100644 (file)
@@ -169,19 +169,25 @@ void VISU::DeformedShape_i::SetMapScale(double theMapScale){
 
 VISU_Actor* 
 VISU::DeformedShape_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
+::CreateActor(const Handle(SALOME_InteractiveObject)& theIO, bool toSupressShrinking
 {
-  VISU_Actor* anActor = VISU::ScalarMap_i::CreateActor(theIO);
+  VISU_Actor* anActor = VISU::ScalarMap_i::CreateActor(theIO, true);
   anActor->SetVTKMapping(false);
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   int  aDispMode = aResourceMgr->integerValue("VISU", "deformed_shape_represent", 1);
   bool toShrink  = aResourceMgr->booleanValue("VISU", "deformed_shape_shrink", false);
   anActor->SetRepresentation(aDispMode);
-  if (toShrink) anActor->SetShrink();
+  if (toShrink && !toSupressShrinking) anActor->SetShrink();
   anActor->GetProperty()->SetColor(myColor.R,myColor.G,myColor.B);
   return anActor;
 }
 
+VISU_Actor* 
+VISU::DeformedShape_i
+::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
+{
+  return CreateActor(theIO, false);
+}
 
 void VISU::DeformedShape_i::UpdateActor(VISU_Actor* theActor) {
   if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
index 64bdbf52936e9946106fdfd1cc59aaec6a1873a1..42854699e5679991f2f24fa8ba90cf8d8f2b4555 100644 (file)
@@ -92,6 +92,10 @@ namespace VISU{
     VISU_Actor* 
     CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
 
+    virtual 
+    VISU_Actor* 
+    CreateActor(const Handle(SALOME_InteractiveObject)& theIO, bool toSupressShrinking);
+
     virtual void UpdateActor(VISU_Actor* theActor) ;
   };
 }
index 71fe93cb66710aa562b41751fce78e75e029bfd6..d2c7a7d366ce123d32a4d7eab4a43b62bdfd6154 100644 (file)
@@ -228,7 +228,7 @@ void VISU::ScalarMapOnDeformedShape_i::DoHook()
 VISU_Actor* VISU::ScalarMapOnDeformedShape_i::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
 {
   if(MYDEBUG) cout << "VISU::ScalarMapOnDeformedShape_i::CreateActor:"<<__LINE__<<endl;
-  VISU_Actor* anActor = TSuperClass::CreateActor(theIO);
+  VISU_Actor* anActor = TSuperClass::CreateActor(theIO, true);
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   int  aDispMode = aResourceMgr->integerValue("VISU", "scalar_def_represent", 2);
   bool toShrink  = aResourceMgr->booleanValue("VISU", "scalar_def_shrink", false);
index 2a26f380d115a3da46362fa0ed8912ba4edf58c8..e56862cfe1df96bf0b5d93a146c46ac2bacc0c3d 100644 (file)
@@ -304,7 +304,7 @@ VISU::ScalarMap_i
 //----------------------------------------------------------------------------
 VISU_Actor* 
 VISU::ScalarMap_i
-::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+::CreateActor(const Handle(SALOME_InteractiveObject)& theIO, bool toSupressShrinking)
 {
   VISU_ScalarMapAct* anActor = VISU_ScalarMapAct::New();
   try{
@@ -315,7 +315,7 @@ VISU::ScalarMap_i
     bool toShrink  = aResourceMgr->booleanValue("VISU", "scalar_map_shrink", false);
     bool toUseShading = aResourceMgr->booleanValue("VISU", "represent_shading", false);
     anActor->SetRepresentation(aDispMode);
-    if (toShrink) anActor->SetShrink();
+    if (toShrink && !toSupressShrinking) anActor->SetShrink();
     anActor->SetShading(toUseShading);
     UpdateActor(anActor);
   }catch(...){
@@ -325,6 +325,13 @@ VISU::ScalarMap_i
   return anActor;
 }
 
+VISU_Actor* 
+VISU::ScalarMap_i
+::CreateActor(const Handle(SALOME_InteractiveObject)& theIO)
+{
+  return CreateActor(theIO, false);
+}
+
 void
 VISU::ScalarMap_i
 ::UpdateActor(VISU_Actor* theActor) 
index 8f969884fc73889f8abbd2802ad11170db0b95f1..ef29f65f428d3954725a72e810ac87ae90fbb141 100644 (file)
@@ -151,6 +151,10 @@ namespace VISU
     virtual 
     VISU_Actor* 
     CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
+    
+    virtual 
+    VISU_Actor* 
+    CreateActor(const Handle(SALOME_InteractiveObject)& theIO, bool toSupressShrinking);
 
     virtual
     void
index 8bf6fa27e50159256beaa76fdfd3bb443bde040b..7aa8273bef16fc7f98260f04be310c3356a084a1 100644 (file)
@@ -271,7 +271,7 @@ VISU_Actor*
 VISU::StreamLines_i
 ::CreateActor(const Handle(SALOME_InteractiveObject)& theIO) 
 {
-  if(VISU_Actor* anActor = VISU::DeformedShape_i::CreateActor(theIO)){
+  if(VISU_Actor* anActor = VISU::DeformedShape_i::CreateActor(theIO, true)){
     anActor->SetVTKMapping(true);
     SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
     int  aDispMode = aResourceMgr->integerValue("VISU", "stream_lines_represent", 1);