]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for issue 0020167( EDF VISU 956 : [TUI ] AddMeshOnGroup is not fully taken into...
authorrnv <rnv@opencascade.com>
Fri, 20 Feb 2009 12:56:09 +0000 (12:56 +0000)
committerrnv <rnv@opencascade.com>
Fri, 20 Feb 2009 12:56:09 +0000 (12:56 +0000)
src/PIPELINE/VISU_ScalarMapPL.cxx
src/VISU_I/VISU_ScalarMap_i.cc

index 7af434d51b63a33c9cfd4c5f9088c2d0097153a9..e32a02aa74827bf7e457bbe50ca99b43015304c3 100644 (file)
@@ -182,6 +182,11 @@ int
 VISU_ScalarMapPL
 ::AddGeometry(vtkDataSet* theGeometry)
 {
+  // rnv: to fix issue 0020167 (AddMeshOnGroup is not fully taken into account)
+  // clear all inpust of the this->myAppendFilter in case if presentation 
+  // constructed on the entire mesh.
+  if(!IsExternalGeometryUsed())
+    ClearGeometry();
   myAppendFilter->AddInput(theGeometry);
   return GetNumberOfGeometry();
 }
index 2ad8a3be8f130f6d6e2ec4fd56b66fee75c460e2..5322effeacd46ddede8c8bb1c3df7995a7846786 100644 (file)
@@ -28,6 +28,7 @@
 #include "VISU_Prs3dUtils.hh"
 
 #include "VISU_Result_i.hh"
+#include "VISU_ResultUtils.hh"
 
 #include "VISU_ScalarMapAct.h"
 #include "VISU_ScalarMapPL.hxx"
@@ -150,6 +151,9 @@ VISU::ScalarMap_i
     aPixmap->SetPixMap(GetIconName());
 
   // Update Object Browser
+  //rnv: to fix issue 0020167 (crash then AddMeshOnGroup called from 
+  //python script). Solution: update object browser using UpdateObjBrowser event.
+  /*
   SUIT_Session* aSession = SUIT_Session::session();
   QList<SUIT_Application*> anApplications = aSession->applications();
   QList<SUIT_Application*>::Iterator anIter = anApplications.begin();
@@ -167,6 +171,9 @@ VISU::ScalarMap_i
     }
     anIter++;
   }
+  */
+  bool done = true;
+  ProcessVoidEvent(new TUpdateObjBrowser(aStudyDocument->StudyId(),&done));
 }
 
 //----------------------------------------------------------------------------