]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Remove dependencies from
authorapo <apo@opencascade.com>
Fri, 24 Nov 2006 15:56:04 +0000 (15:56 +0000)
committerapo <apo@opencascade.com>
Fri, 24 Nov 2006 15:56:04 +0000 (15:56 +0000)
#include "VISU_ColoredPrs3dCache_i.hh"
#include "VISU_ColoredPrs3dHolder_i.hh"

src/VISUGUI/VisuGUI_Displayer.cxx
src/VISUGUI/VisuGUI_Tools.cxx

index af25a1bcf05070faab7d49ec1b8ce8b1e768085e..49df36c63ef334a1bad82cc441a2fc455938a542 100644 (file)
@@ -30,7 +30,6 @@
 
 #include "VisuGUI_Tools.h"
 #include "VISU_ViewManager_i.hh"
-#include "VISU_ColoredPrs3dHolder_i.hh"
 #include "VISU_Actor.h"
 
 #include "VVTK_ViewModel.h"
@@ -268,7 +267,7 @@ bool VisuGUI_Displayer::canBeDisplayed( const QString& entry, const QString& vie
   {
     VISU::Base_i* aBase = dynamic_cast<VISU::Base_i*>(VISU::GetServant(anObj).in());
     if(aBase->GetType() == VISU::TCOLOREDPRS3DHOLDER)
-      return dynamic_cast<VISU::ColoredPrs3dHolder_i*>(aBase);
+      return true;
 
     return dynamic_cast<VISU::Prs3d_i*>(aBase);
   }
index ad1e41d6d0b66b33af04555ec479e760a233e079..9b2d8e733b93ac60ed916285a9252cbeeb0de8cb 100644 (file)
@@ -37,8 +37,6 @@
 #include "VISU_Table_i.hh"
 #include "VISU_Mesh_i.hh"
 #include "VISU_ViewManager_i.hh"
-#include "VISU_ColoredPrs3dCache_i.hh"
-#include "VISU_ColoredPrs3dHolder_i.hh"
 
 #include "VISU_Actor.h"
 #include "VISU_ScalarMapAct.h"
@@ -306,10 +304,11 @@ namespace VISU
       return NULL;
 
     VISU::Base_i* aBase = dynamic_cast<VISU::Base_i*>(aServant.in());
-    if(aBase->GetType() == VISU::TCOLOREDPRS3DHOLDER)
-    {
-      VISU::ColoredPrs3dHolder_i* aHolder = dynamic_cast<VISU::ColoredPrs3dHolder_i*>(aBase);
-      return dynamic_cast<VISU::ColoredPrs3d_i*>(VISU::GetServant(aHolder->GetDevice()).in());
+    if(aBase->GetType() == VISU::TCOLOREDPRS3DHOLDER){
+      VISU::ColoredPrs3dHolder_var aHolder = VISU::ColoredPrs3dHolder::_narrow(anObject);
+      VISU::ColoredPrs3d_var aColoredPrs3d = aHolder->GetDevice();
+      aServant = VISU::GetServant(aColoredPrs3d);
+      aBase = dynamic_cast<VISU::Base_i*>(aServant.in());
     }
 
     return dynamic_cast<VISU::Prs3d_i*>(aBase);