From: mzn Date: Fri, 21 Jul 2006 09:58:24 +0000 (+0000) Subject: Fix for IPAL12374. X-Git-Tag: For_OCT_611~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=25d2f3627b6099224d4a8730b2c0bbfee03efcb2;p=modules%2Fvisu.git Fix for IPAL12374. --- diff --git a/src/VISU_I/VISU_DeformedShape_i.cc b/src/VISU_I/VISU_DeformedShape_i.cc index 7f9b4b7f..8c2920dc 100644 --- a/src/VISU_I/VISU_DeformedShape_i.cc +++ b/src/VISU_I/VISU_DeformedShape_i.cc @@ -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(theActor)){ diff --git a/src/VISU_I/VISU_DeformedShape_i.hh b/src/VISU_I/VISU_DeformedShape_i.hh index 64bdbf52..42854699 100644 --- a/src/VISU_I/VISU_DeformedShape_i.hh +++ b/src/VISU_I/VISU_DeformedShape_i.hh @@ -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) ; }; } diff --git a/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc b/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc index 71fe93cb..d2c7a7d3 100644 --- a/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc +++ b/src/VISU_I/VISU_ScalarMapOnDeformedShape_i.cc @@ -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__<integerValue("VISU", "scalar_def_represent", 2); bool toShrink = aResourceMgr->booleanValue("VISU", "scalar_def_shrink", false); diff --git a/src/VISU_I/VISU_ScalarMap_i.cc b/src/VISU_I/VISU_ScalarMap_i.cc index 2a26f380..e56862cf 100644 --- a/src/VISU_I/VISU_ScalarMap_i.cc +++ b/src/VISU_I/VISU_ScalarMap_i.cc @@ -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) diff --git a/src/VISU_I/VISU_ScalarMap_i.hh b/src/VISU_I/VISU_ScalarMap_i.hh index 8f969884..ef29f65f 100644 --- a/src/VISU_I/VISU_ScalarMap_i.hh +++ b/src/VISU_I/VISU_ScalarMap_i.hh @@ -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 diff --git a/src/VISU_I/VISU_StreamLines_i.cc b/src/VISU_I/VISU_StreamLines_i.cc index 8bf6fa27..7aa8273b 100644 --- a/src/VISU_I/VISU_StreamLines_i.cc +++ b/src/VISU_I/VISU_StreamLines_i.cc @@ -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);