From: rnv Date: Fri, 20 Feb 2009 12:56:09 +0000 (+0000) Subject: Fix for issue 0020167( EDF VISU 956 : [TUI ] AddMeshOnGroup is not fully taken into... X-Git-Tag: V5_1_1a1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=00f5752efbb4a59a7982deb702c6af1d6dce5989;p=modules%2Fvisu.git Fix for issue 0020167( EDF VISU 956 : [TUI ] AddMeshOnGroup is not fully taken into account) in 5X version. --- diff --git a/src/PIPELINE/VISU_ScalarMapPL.cxx b/src/PIPELINE/VISU_ScalarMapPL.cxx index 7af434d5..e32a02aa 100644 --- a/src/PIPELINE/VISU_ScalarMapPL.cxx +++ b/src/PIPELINE/VISU_ScalarMapPL.cxx @@ -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(); } diff --git a/src/VISU_I/VISU_ScalarMap_i.cc b/src/VISU_I/VISU_ScalarMap_i.cc index 2ad8a3be..5322effe 100644 --- a/src/VISU_I/VISU_ScalarMap_i.cc +++ b/src/VISU_I/VISU_ScalarMap_i.cc @@ -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 anApplications = aSession->applications(); QList::Iterator anIter = anApplications.begin(); @@ -167,6 +171,9 @@ VISU::ScalarMap_i } anIter++; } + */ + bool done = true; + ProcessVoidEvent(new TUpdateObjBrowser(aStudyDocument->StudyId(),&done)); } //----------------------------------------------------------------------------