From: apo Date: Thu, 17 May 2007 08:06:14 +0000 (+0000) Subject: Fix for Bug IPAL15065 X-Git-Tag: mergeto_BR_Dev_For_4_0_21May07~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6462f16f7fb84eeb392e41774f320aec92eb10b4;p=modules%2Fvisu.git Fix for Bug IPAL15065 - IOLS. Representation option works first time only. (now it is necessary to call myParamsTime.Modified() inside of Prs3d sub classes when a presentation parameter is changed) --- diff --git a/src/VISU_I/VISU_Mesh_i.cc b/src/VISU_I/VISU_Mesh_i.cc index 9504d29b..45669d75 100644 --- a/src/VISU_I/VISU_Mesh_i.cc +++ b/src/VISU_I/VISU_Mesh_i.cc @@ -30,6 +30,7 @@ #include "VISU_MeshAct.h" #include "VISU_MeshPL.hxx" +#include "VISU_PipeLineUtils.hxx" #include "VISU_Convertor.hxx" #include "SALOME_Event.hxx" @@ -44,6 +45,20 @@ static int MYDEBUG = 0; static int INCMEMORY = 4; +//---------------------------------------------------------------------------- +namespace +{ + bool + IsSameColor(const SALOMEDS::Color& theLeft, + const SALOMEDS::Color& theRight) + { + return + VISU::CheckIsSameValue(theLeft.R, theRight.R) && + VISU::CheckIsSameValue(theLeft.G, theRight.G) && + VISU::CheckIsSameValue(theLeft.B, theRight.B); + } +} + //---------------------------------------------------------------------------- int VISU::Mesh_i::myNbPresent = 0; @@ -314,7 +329,11 @@ void VISU::Mesh_i ::SetCellColor(const SALOMEDS::Color& theColor) { + if(IsSameColor(myCellColor, theColor)) + return; + myCellColor = theColor; + myParamsTime.Modified(); } @@ -332,7 +351,11 @@ void VISU::Mesh_i ::SetNodeColor(const SALOMEDS::Color& theColor) { + if(IsSameColor(myNodeColor, theColor)) + return; + myNodeColor = theColor; + myParamsTime.Modified(); } @@ -350,7 +373,11 @@ void VISU::Mesh_i ::SetLinkColor(const SALOMEDS::Color& theColor) { + if(IsSameColor(myLinkColor, theColor)) + return; + myLinkColor = theColor; + myParamsTime.Modified(); } @@ -368,7 +395,11 @@ void VISU::Mesh_i ::SetPresentationType(VISU::PresentationType theType) { + if(myPresentType == theType) + return; + myPresentType = theType; + myParamsTime.Modified(); }