From: ana Date: Fri, 13 Apr 2012 11:23:02 +0000 (+0000) Subject: Fix for the "0021179: EDF 1654 SMESH GEOM: better look'n'feel" issue: X-Git-Tag: TRIPOLI_323~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c9dd1ccde217f733d8cbc475415f0481c3be38e5;p=modules%2Fgui.git Fix for the "0021179: EDF 1654 SMESH GEOM: better look'n'feel" issue: - Material Properties --- diff --git a/src/SVTK/SVTK_View.cxx b/src/SVTK/SVTK_View.cxx index ba50f38a2..03a9070fe 100644 --- a/src/SVTK/SVTK_View.cxx +++ b/src/SVTK/SVTK_View.cxx @@ -746,20 +746,17 @@ SVTK_View /*! Change material \param theIObject - object - \param thePropF - property contained new properties of front material - \param thePropB - property contained new properties of back material + \param thePropF - property contained new properties of material */ void SVTK_View ::SetMaterial(const Handle(SALOME_InteractiveObject)& theIObject, - vtkProperty* thePropF, - vtkProperty* thePropB) + vtkProperty* thePropF) { using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); std::vector aProps; aProps.push_back( thePropF ); - aProps.push_back( thePropB ); ForEachIf(aCopy.GetActors(), TIsSameIObject(theIObject), TSetFunction > @@ -769,11 +766,11 @@ SVTK_View /*! Get current front material \param theIObject - object - \return property contained front material properties of the given object + \return property contained material properties of the given object */ vtkProperty* SVTK_View -::GetFrontMaterial(const Handle(SALOME_InteractiveObject)& theIObject) +::GetMaterial(const Handle(SALOME_InteractiveObject)& theIObject) { using namespace SVTK; VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); @@ -781,26 +778,7 @@ SVTK_View Find(aCopy.GetActors(), TIsSameIObject(theIObject)); if(anActor) - return anActor->GetFrontMaterial(); - return NULL; -} - -/*! - Get current back material - \param theIObject - object - \return property contained back material properties of the given object -*/ -vtkProperty* -SVTK_View -::GetBackMaterial(const Handle(SALOME_InteractiveObject)& theIObject) -{ - using namespace SVTK; - VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors()); - SALOME_Actor* anActor = - Find(aCopy.GetActors(), - TIsSameIObject(theIObject)); - if(anActor) - return anActor->GetBackMaterial(); + return anActor->GetMaterial(); return NULL; } diff --git a/src/SVTK/SVTK_View.h b/src/SVTK/SVTK_View.h index 7840d442d..0542c24f9 100644 --- a/src/SVTK/SVTK_View.h +++ b/src/SVTK/SVTK_View.h @@ -212,16 +212,11 @@ public: //! Change material void SetMaterial(const Handle(SALOME_InteractiveObject)& theIObject, - vtkProperty* thePropF, - vtkProperty* thePropB); + vtkProperty* thePropF); - //! Get current front material + //! Get current material vtkProperty* - GetFrontMaterial(const Handle(SALOME_InteractiveObject)& theIObject); - - //! Get current back material - vtkProperty* - GetBackMaterial(const Handle(SALOME_InteractiveObject)& theIObject); + GetMaterial(const Handle(SALOME_InteractiveObject)& theIObject); //---------------------------------------------------------------------------- // Erase Display functions diff --git a/src/VTKViewer/VTKViewer_Actor.cxx b/src/VTKViewer/VTKViewer_Actor.cxx index 3389a6a01..624ed1deb 100755 --- a/src/VTKViewer/VTKViewer_Actor.cxx +++ b/src/VTKViewer/VTKViewer_Actor.cxx @@ -621,26 +621,15 @@ VTKViewer_Actor } /*! - Get current front material + Get current material */ vtkProperty* VTKViewer_Actor -::GetFrontMaterial() +::GetMaterial() { return NULL; } -/*! - Get current back material -*/ -vtkProperty* -VTKViewer_Actor -::GetBackMaterial() -{ - return NULL; -} - - /*! \return display mode */ diff --git a/src/VTKViewer/VTKViewer_Actor.h b/src/VTKViewer/VTKViewer_Actor.h index c1ae2e70b..5a385e56c 100755 --- a/src/VTKViewer/VTKViewer_Actor.h +++ b/src/VTKViewer/VTKViewer_Actor.h @@ -124,15 +124,10 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor void SetMaterial(std::vector theProps); - //! Get current front material + //! Get current material virtual vtkProperty* - GetFrontMaterial(); - - //! Get current back material - virtual - vtkProperty* - GetBackMaterial(); + GetMaterial(); //---------------------------------------------------------------------------- // For selection mapping purpose