]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Merge from V6_4_BR 05/12/2011 mergefrom_V6_4_BR_05Dec11
authorvsr <vsr@opencascade.com>
Mon, 5 Dec 2011 11:06:20 +0000 (11:06 +0000)
committervsr <vsr@opencascade.com>
Mon, 5 Dec 2011 11:06:20 +0000 (11:06 +0000)
14 files changed:
clean_configure
configure.ac
src/OBJECT/VISU_SelectVisiblePoints.cxx
src/PIPELINE/VISU_PlanesWidget.cxx
src/PIPELINE/VISU_SphereWidget.cxx
src/PIPELINE/VISU_XYPlotActor.cxx
src/VISUGUI/VISU_msg_en.ts
src/VISUGUI/VISU_msg_fr.ts
src/VISUGUI/VisuGUI.cxx
src/VISUGUI/VisuGUI_BuildProgressDlg.cxx
src/VISUGUI/VisuGUI_Sweep.cxx
src/VISU_I/VISU_ColoredPrs3dCache_i.cc
src/VISU_I/VISU_Result_i.cc
src/VISU_SWIG/VISU_Gen_s.cc

index 5860643846bc7bd8d365de9485f68c5013bc9576..7bb2643df79fc0a00bd1170c3f2d30a96945d657 100755 (executable)
@@ -24,10 +24,5 @@ find . -name "*.pyc" -print -exec rm {} \;
 #exit
 # ==================== ON SORT AVANT
 
-find bin -name Makefile.in | xargs rm -f
-find doc -name Makefile.in | xargs rm -f
-find idl -name Makefile.in | xargs rm -f
-find resources -name Makefile.in | xargs rm -f
-find salome_adm -name Makefile.in | xargs rm -f
-find src -name Makefile.in | xargs rm -f
-rm -f Makefile.in
+find . -name Makefile.in | xargs rm -f
+( cd adm_local/unix/config_files && rm -f config.* depcomp install-sh ltmain.sh missing py-compile )
index ddb29aae7753dbdee6941c8af6df149cd4505f91..4d36c5c795e869a1b3c591bd1ba8372f73f594cf 100644 (file)
@@ -23,7 +23,7 @@
 # Modified by : Marc Tajchman (CEA)
 # Modified by : Mikhail Ponikarov (OCN)
 #
-AC_INIT([Salome2 Project VISU module], [6.3.1], [webmaster.salome@opencascade.com], [SalomeVISU])
+AC_INIT([Salome2 Project VISU module], [6.4.0], [webmaster.salome@opencascade.com], [SalomeVISU])
 AC_CONFIG_AUX_DIR(adm_local/unix/config_files)
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
index 40eb6f1da46c996c691068303176a878af906349..719f0ccf490b40eda9e0625713e7d6019d5ca026 100644 (file)
@@ -120,8 +120,7 @@ int VISU_SelectVisiblePoints::RequestData(
   vtkMatrix4x4 *matrix = vtkMatrix4x4::New();
   double view[4];
   matrix->DeepCopy(this->Renderer->GetActiveCamera()->
-                   GetCompositePerspectiveTransformMatrix(
-                     this->Renderer->GetTiledAspectRatio(),0,1));
+                  GetCompositeProjectionTransformMatrix(this->Renderer->GetTiledAspectRatio(),0,1));
 
   // If we have more than a few query points, we grab the z-buffer for the
   // selection region all at once and probe the resulting array.  When we
index 180febf7293d6837212780a43af5244bc04a6c9d..5732f27b6a36f47f883858fa8cefbd5a9e1c602b 100644 (file)
@@ -605,7 +605,7 @@ void VISU_PlanesWidget::OnLeftButtonDown()
     return;
   }
 
-  vtkProp *prop = path->GetFirstNode()->GetProp();
+  vtkProp *prop = path->GetFirstNode()->GetViewProp();
   this->ValidPick = 1;
   this->Picker->GetPickPosition(this->LastPickPosition);
   //
index 141d51a36c0e498c7b41de4cf982f6b7c03599cd..3cc2b92375721466ac8835ae4f03fccc8bb8df9f 100755 (executable)
@@ -348,7 +348,7 @@ void VISU_SphereWidget::OnLeftButtonDown()
   // if no places picked, then try to pick the sphere.
   myPicker->Pick(X, Y, 0., CurrentRenderer);
   if(vtkAssemblyPath *aPath = myPicker->GetPath()){
-    if(aPath->GetFirstNode()->GetProp() == mySphereActor){
+    if(aPath->GetFirstNode()->GetViewProp() == mySphereActor){
       myState = VISU_SphereWidget::Moving;
       HighlightSphere(1);
     }
index 9c66379bc7d53ca0d807974c9d419d0473143183..738780abdc15703a3b91d8801758bfec78d0c1fd 100644 (file)
@@ -600,12 +600,12 @@ int VISU_XYPlotActor::RenderOpaqueGeometry(vtkViewport *viewport)
     if (this->AxisLabelTextProperty &&
         this->AxisLabelTextProperty->GetMTime() > this->BuildTime)
       {
-      if (this->XAxis->GetTitleTextProperty())
+      if (this->XAxis->GetLabelTextProperty())
         {
         this->XAxis->GetLabelTextProperty()->ShallowCopy(
           this->AxisLabelTextProperty);
         }
-      if (this->YAxis->GetTitleTextProperty())
+      if (this->YAxis->GetLabelTextProperty())
         {
         this->YAxis->GetLabelTextProperty()->ShallowCopy(
           this->AxisLabelTextProperty);
@@ -1011,6 +1011,11 @@ void VISU_XYPlotActor::ComputeXRange(double range[2], double *lengths)
         (ds = this->InputList->GetNextDataSet(dsit)); dsNum++)
     {
     numPts = ds->GetNumberOfPoints();
+    if (numPts == 0)
+      {
+      vtkErrorMacro(<<"No scalar data to plot!");
+      continue;
+      }
 
     if ( this->XValues != VTK_XYPLOT_INDEX )
       {
@@ -1144,6 +1149,26 @@ void VISU_XYPlotActor::ComputeYRange(double range[2])
     }//over all datasets
 }
 
+//----------------------------------------------------------------------------
+static inline int VISU_XYPlotActorGetComponent(vtkFieldData* field,
+  vtkIdType tuple, int component, double* val)
+{
+  int array_comp;
+  int array_index = field->GetArrayContainingComponent(component, array_comp);
+  if (array_index < 0)
+    {
+    return 0;
+    }
+  vtkDataArray* da = field->GetArray(array_index);
+  if (!da)
+    {
+    // non-numeric array.
+    return 0;
+    }
+  *val = da->GetComponent(tuple, array_comp);
+  return 1;
+}
+
 //----------------------------------------------------------------------------
 void VISU_XYPlotActor::ComputeDORange(double xrange[2], double yrange[2], 
                                     double *lengths)
@@ -1153,21 +1178,34 @@ void VISU_XYPlotActor::ComputeDORange(double xrange[2], double yrange[2],
   vtkFieldData *field;
   int doNum, numColumns;
   vtkIdType numTuples, numRows, num, ptId, maxNum;
-  double maxLength=0.0, x, y, xPrev = 0.0;
+  double maxLength=0.0;
+  double x = 0.0;
+  double y = 0.0;
+  double xPrev = 0.0;
   vtkDataArray *array;
-
+  
+  // NOTE: FieldData can have non-numeric arrays. However, XY plot can only 
+  // work on numeric arrays (or vtkDataArray subclasses). 
+  
   xrange[0] = yrange[0] = VTK_DOUBLE_MAX;
   xrange[1] = yrange[1] = -VTK_DOUBLE_MAX;
   vtkCollectionSimpleIterator doit;
   for ( doNum=0, maxNum=0, this->DataObjectInputList->InitTraversal(doit); 
         (dobj = this->DataObjectInputList->GetNextDataObject(doit)); doNum++)
     {
+
     lengths[doNum] = 0.0;
     field = dobj->GetFieldData();
-    numColumns = field->GetNumberOfComponents(); //number of "columns"
+    numColumns = field->GetNumberOfComponents();  //number of "columns"
+      // numColumns includes the components for non-numeric arrays as well.
     for (numRows = VTK_LARGE_ID, i=0; i<field->GetNumberOfArrays(); i++)
       {
       array = field->GetArray(i);
+      if (!array)
+        {
+        // non-numeric array, skip.
+        continue;
+        }
       numTuples = array->GetNumberOfTuples();
       if ( numTuples < numRows )
         {
@@ -1183,13 +1221,24 @@ void VISU_XYPlotActor::ComputeDORange(double xrange[2], double yrange[2],
       // gather the information to form a plot
       for ( ptId=0; ptId < num; ptId++ )
         {
+        int status = 0;
+      
         if ( this->DataObjectPlotMode == VTK_XYPLOT_ROW )
           {
-          x = field->GetComponent(this->XComponent->GetValue(doNum), ptId);
+          // x = field->GetComponent(this->XComponent->GetValue(doNum), ptId);
+          status = ::VISU_XYPlotActorGetComponent(field,
+            this->XComponent->GetValue(doNum), ptId, &x);
           }
         else //if ( this->DataObjectPlotMode == VTK_XYPLOT_COLUMN )
           {
-          x = field->GetComponent(ptId, this->XComponent->GetValue(doNum));
+          // x = field->GetComponent(ptId, this->XComponent->GetValue(doNum));
+          status = ::VISU_XYPlotActorGetComponent(field,
+            ptId, this->XComponent->GetValue(doNum), &x);
+          }
+        if (!status)
+          {
+          // requested component falls in a non-numeric array, skip it.
+          continue;
           }
         if ( ptId == 0 )
           {
@@ -1244,13 +1293,24 @@ void VISU_XYPlotActor::ComputeDORange(double xrange[2], double yrange[2],
     // Get the y-values
     for ( ptId=0; ptId < num; ptId++ )
       {
+      int status = 0;
       if ( this->DataObjectPlotMode == VTK_XYPLOT_ROW )
         {
-        y = field->GetComponent(this->YComponent->GetValue(doNum), ptId);
+        //y = field->GetComponent(this->YComponent->GetValue(doNum), ptId);
+        status = ::VISU_XYPlotActorGetComponent(field,
+          this->YComponent->GetValue(doNum), ptId, &y);
         }
       else //if ( this->DataObjectPlotMode == VTK_XYPLOT_COLUMN )
         {
-        y = field->GetComponent(ptId, this->YComponent->GetValue(doNum));
+        //y = field->GetComponent(ptId, this->YComponent->GetValue(doNum));
+        status = ::VISU_XYPlotActorGetComponent(field,
+          ptId, this->YComponent->GetValue(doNum), &y);
+        }
+      if (!status)
+        {
+        // requested component falls in non-numeric array.
+        // skip.
+        continue;
         }
       if ( y < yrange[0] )
         {
@@ -1526,9 +1586,15 @@ void VISU_XYPlotActor::CreatePlotData(int *pos, int *pos2Extern, double xRange[2
       // determine the shape of the field
       field = dobj->GetFieldData();
       numColumns = field->GetNumberOfComponents(); //number of "columns"
+      // numColumns also includes non-numeric array components.
       for (numRows = VTK_LARGE_ID, i=0; i<field->GetNumberOfArrays(); i++)
         {
         array = field->GetArray(i);
+        if (!array)
+          {
+          // skip non-numeric arrays.
+          continue;
+          }
         numTuples = array->GetNumberOfTuples();
         if ( numTuples < numRows )
           {
@@ -1546,15 +1612,42 @@ void VISU_XYPlotActor::CreatePlotData(int *pos, int *pos2Extern, double xRange[2
       // gather the information to form a plot
       for ( numLinePts=0, length=0.0, ptId=0; ptId < numPts; ptId++ )
         {
+        int status1, status2;
         if ( this->DataObjectPlotMode == VTK_XYPLOT_ROW )
           {
-          x[0] = field->GetComponent(this->XComponent->GetValue(doNum),ptId);
-          xyz[1] = field->GetComponent(this->YComponent->GetValue(doNum),ptId);
+          //x[0] = field->GetComponent(this->XComponent->GetValue(doNum),ptId);
+          //xyz[1] = field->GetComponent(this->YComponent->GetValue(doNum),ptId);
+          status1 = ::VISU_XYPlotActorGetComponent(field,
+            this->XComponent->GetValue(doNum), ptId, &x[0]);
+          status2 = ::VISU_XYPlotActorGetComponent(field,
+            this->YComponent->GetValue(doNum), ptId, &xyz[1]);
           }
         else //if ( this->DataObjectPlotMode == VTK_XYPLOT_COLUMN )
           {
-          x[0] = field->GetComponent(ptId, this->XComponent->GetValue(doNum));
-          xyz[1] = field->GetComponent(ptId, this->YComponent->GetValue(doNum));
+          //x[0] = field->GetComponent(ptId, this->XComponent->GetValue(doNum));
+          //xyz[1] = field->GetComponent(ptId, this->YComponent->GetValue(doNum));
+
+          status1 = ::VISU_XYPlotActorGetComponent(field,
+            ptId, this->XComponent->GetValue(doNum), &x[0]);
+
+          if (!status1)
+            {
+            vtkWarningMacro(<< this->XComponent->GetValue(doNum) << " is a non-numeric component.");
+            }
+          
+          status2 = ::VISU_XYPlotActorGetComponent(field,
+            ptId, this->YComponent->GetValue(doNum), &xyz[1]);
+
+          if (!status2)
+            {
+            vtkWarningMacro(<< this->YComponent->GetValue(doNum) << " is a non-numeric component.");
+            }
+          }
+        if (!status1 || !status2)
+          {
+          // component is non-numeric.
+          // Skip it.
+          continue;
           }
 
         switch (this->XValues)
@@ -2079,25 +2172,31 @@ void VISU_XYPlotActor::ClipPlotData(int *pos, int *pos2, vtkPolyData *pd)
         }
       else
         {
+        newPts[0] = -1;
         if (x1[0] >= p1[0] && x1[0] <= p2[0] && x1[1] >= p1[1] && x1[1] <= p2[1] )
           {//first point in
           newPts[0] = pointMap[pts[i]];
           }
-        else
+        else if (x2[0] >= p1[0] && x2[0] <= p2[0] && x2[1] >= p1[1] && x2[1] <= p2[1] )
           {//second point in
           newPts[0] = pointMap[pts[i+1]];
           }
-        for (j=0; j<4; j++)
+
+        //only create cell if either x1 or x2 is inside the range
+        if (newPts[0] >= 0)
           {
-          this->ClipPlanes->GetPoints()->GetPoint(j, px);
-          this->ClipPlanes->GetNormals()->GetTuple(j, n);
-          if ( vtkPlane::IntersectWithLine(x1,x2,n,px,t,xint) && t >= 0 && t <= 1.0 )
+          for (j=0; j<4; j++)
             {
-            newPts[1] = newPoints->InsertNextPoint(xint);
-            break;
+            this->ClipPlanes->GetPoints()->GetPoint(j, px);
+            this->ClipPlanes->GetNormals()->GetTuple(j, n);
+            if ( vtkPlane::IntersectWithLine(x1,x2,n,px,t,xint) && t >= 0 && t <= 1.0 )
+              {
+              newPts[1] = newPoints->InsertNextPoint(xint);
+              break;
+              }
             }
+            newLines->InsertNextCell(2,newPts);
           }
-        newLines->InsertNextCell(2,newPts);
         }
       }
     }
index f8eda5b46887797e85c79e8b8a6dba220e52bc70..05b5f2b1030f1307ad662832445f691123ff4f62 100644 (file)
@@ -1143,6 +1143,10 @@ Input value precision can be adjusted using
         <source>UNKNOWN_IMPORT_ERROR</source>
         <translation>Unknown error</translation>
     </message>
+    <message>
+        <source>UNSUPPORTED_FILE_FORMAT</source>
+        <translation>Unsupported file format</translation>
+    </message>
     <message>
         <source>VALUES_LABELING</source>
         <translation>Values labeling</translation>
index 1a05fc8faab31a2a6565307f79d3658a0041a681..bac238351b39ddd2c36923b3a2c514f6dc506a6b 100755 (executable)
@@ -667,6 +667,10 @@ le &apos;%1&apos; paramètre des préférences du module Post-Pro.</translation>
         <source>FLT_MED_FILES</source>
         <translation>Fichiers MED (*.med)</translation>
     </message>
+    <message>
+        <source>FLT_SAUV_FILES</source>
+        <translation>Fichiers SAUV (*.sauv*)</translation>
+    </message>
     <message>
         <source>FLT_TABLE_FILES</source>
         <translation>Tables (*.txt *.tab *.csv)</translation>
@@ -739,6 +743,10 @@ le &apos;%1&apos; paramètre des préférences du module Post-Pro.</translation>
         <source>MEN_CURVE_PROPS</source>
         <translation>Paramètres...</translation>
     </message>
+    <message>
+        <source>MEN_CURVE_SCALE</source>
+        <translation>Facteur d&apos;échelle...</translation>
+    </message>
     <message>
         <source>MEN_CUT_LINES</source>
         <translation>Lignes de coupe</translation>
@@ -855,6 +863,10 @@ le &apos;%1&apos; paramètre des préférences du module Post-Pro.</translation>
         <source>MEN_IMPORT_MED_TIMESTAMP</source>
         <translation>Importer un pas de temps</translation>
     </message>
+    <message>
+        <source>MEN_IMPORT_SAUV</source>
+        <translation>Fichier SAUV</translation>
+    </message>
     <message>
         <source>MEN_IMPORT_TABLE</source>
         <translation>Table du Fichier</translation>
@@ -1131,6 +1143,10 @@ le &apos;%1&apos; paramètre des préférences du module Post-Pro.</translation>
         <source>UNKNOWN_IMPORT_ERROR</source>
         <translation>Erreur inconnue</translation>
     </message>
+    <message>
+        <source>UNSUPPORTED_FILE_FORMAT</source>
+        <translation>Format de fichier non supporté</translation>
+    </message>
     <message>
         <source>VALUES_LABELING</source>
         <translation>Etiquettes des Valeurs</translation>
@@ -1237,6 +1253,10 @@ le &apos;%1&apos; paramètre des préférences du module Post-Pro.</translation>
         <source>FLT_MED_FILES</source>
         <translation>Fichiers MED (*.med)</translation>
     </message>
+    <message>
+        <source>FLT_SAUV_FILES</source>
+        <translation>Fichiers SAUV (*.sauv*)</translation>
+    </message>
     <message>
         <source>HELP</source>
         <translation>Aide</translation>
index 64f2fa6fbbd276f3a067a7c5f7f8775a79a9eb7a..e5ea3f837822cc25043b909b3b3f33fc4fcfb10b 100644 (file)
@@ -26,6 +26,9 @@
 //  Module : VISU
 
 #include <Standard_math.hxx>  // E.A. must be included before Python.h to fix compilation on windows
+#ifdef HAVE_FINITE
+#undef HAVE_FINITE            // VSR: avoid compilation warning on Linux : "HAVE_FINITE" redefined
+#endif
 #include "Python.h"
 
 #include "VisuGUI.h"
@@ -507,7 +510,7 @@ VisuGUI
         }
       }
       catch(...) {
-        errors.append( QString( "%1 :\n\t%2" ).arg( aFileInfo.filePath() ).arg( tr( "UNKNOWN_IMPORT_ERROR" ) ) );
+        errors.append( QString( "%1 :\n\t%2" ).arg( aFileInfo.filePath() ).arg( tr( "UNSUPPORTED_FILE_FORMAT" ) ) );
       }
     }
   }
@@ -4943,6 +4946,11 @@ bool VisuGUI::renameAllowed( const QString& entry) const {
         aType == VISU::TPOINTMAP3D || aType == VISU::TVIEW3D ||
         aType == VISU::TPOINTMAP3D || aType == VISU::TGAUSSPOINTS)
       return true;
+  } else {
+    VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
+    bool anIsExist;
+    QString aVal = VISU::Storable::FindValue(aMap, "myComment", &anIsExist);
+    return anIsExist && "VIEW3D" == aVal;
   }
   return false;
 }
@@ -4963,6 +4971,7 @@ bool VisuGUI::renameObject( const QString& entry, const QString& name) {
   _PTR(SObject) aSObject = anObjectInfo.mySObject;
   if (aSObject) {
     VISU::Base_i* aBase = anObjectInfo.myBase;
+    VISU::Storable::TRestoringMap aMap = VISU::Storable::GetStorableMap(anObjectInfo.mySObject);
     if(aBase){
       VISU::VISUType aType = aBase->GetType();
       if( aType == VISU::TCOLOREDPRS3DHOLDER ) {
@@ -5030,6 +5039,19 @@ bool VisuGUI::renameObject( const QString& entry, const QString& name) {
            return true;
          }
        }
+       //Rename visual params
+      }
+    } else {
+      bool anIsExist;
+      QString aVal = VISU::Storable::FindValue(aMap, "myComment", &anIsExist);
+      if(anIsExist && "VIEW3D" == aVal) {
+       _PTR(GenericAttribute) anAttr;
+       if (aSObject->FindAttribute(anAttr, "AttributeName")) {
+         _PTR(AttributeName) aName (anAttr);
+         if (!name.isEmpty()) {
+           aName->SetValue(qPrintable(name));
+         }
+       }
       }
     }
   }
index 98adfe218e424f169e07fd4679feded2cee642bb..ab8ae2398ed3596460a3bc6b500cea15ef6639a7 100644 (file)
@@ -263,7 +263,7 @@ void VisuGUI_BuildProgressDlg::onStart()
     if( aBuildAtOnce )
     {
       QApplication::setOverrideCursor( Qt::WaitCursor );
-      myCurrentTime = vtkTimerLog::GetCurrentTime();
+      myCurrentTime = vtkTimerLog::GetUniversalTime();
     }
 
     myTime.setHMS( 0, 0, 0 );
@@ -358,7 +358,7 @@ void VisuGUI_BuildProgressDlg::onTimer()
         QApplication::restoreOverrideCursor();
 
         QTime aTime;
-        int mSecs = ( int )( 1000 * ( vtkTimerLog::GetCurrentTime() - myCurrentTime ) );
+        int mSecs = ( int )( 1000 * ( vtkTimerLog::GetUniversalTime() - myCurrentTime ) );
         aTime = aTime.addMSecs( mSecs );
         if( aTime.minute() > 9 )
           myTimeLCDNumber->setNumDigits( 9 );
index 74ea0207b0b78a5be11dcda9b92609afecef21c0..f44a1e44b694c41df20d2f3c21f50eeec2c48448 100644 (file)
@@ -363,8 +363,7 @@ void VisuGUI_Sweep::onSelectionChanged()
 //----------------------------------------------------------------------------
 void VisuGUI_Sweep::onValueChanged( int value )
 {
-  bool anIsValidSelection = ( myColoredPrs3d != NULL )
-                          && (myActor != NULL );
+  bool anIsValidSelection = ( myColoredPrs3d != 0 ) && ( myActor != 0 );
 
   if ( !anIsValidSelection )
     return;
index 6df8e7443b1bd6c6cdf94efc955d99c45124daac..a385a8a01fdecdf11346cdd840d79abd0b202a66 100644 (file)
@@ -39,6 +39,7 @@
 #include "VISU_Actor.h"
 
 #include "VISU_PipeLine.hxx"
+#include "VISU_Tools.h"
 
 #include "SALOME_Event.h"
 
@@ -712,6 +713,7 @@ VISU::ColoredPrs3dCache_i
            ProcessVoidEvent(new TAddActorEvent(anActor,aViewWindow));
            //aViewWindow->AddActor(anActor);
            anActor->SetVisibility(true);
+           SetVisibilityState( aHolderEntry, Qtx::ShownState);
          }
 
          if(aPrs3d != aLastVisitedPrs3d)
@@ -728,8 +730,10 @@ VISU::ColoredPrs3dCache_i
              aNewActor = aPrs3d->CreateActor();
              ProcessVoidEvent(new TAddActorEvent(aNewActor,aViewWindow));
              //aViewWindow->AddActor(aNewActor);
-           }else
+           }else {
              aNewActor->SetVisibility(true);
+             SetVisibilityState( aHolderEntry, Qtx::ShownState);
+           }
            aNewActor->DeepCopy(anActor);
 
            aPrs3d->SetActiveState(true);
index a49ff289ffea2ea876ffdf24d864c0febc691be9..e3058e7a02402172d01bdb16d25654eb8d0a9675 100644 (file)
@@ -141,6 +141,31 @@ namespace VISU
     aStudyBuilder->Addreference(newObj,aRefSObj);
   }
 
+  //---------------------------------------------------------------
+  // Issue 0021403. Remove a ColoredPrs3dHolder if a Result it refers to is removed
+  //
+  void RemoveHolders(VISU::Result_i* theResult)
+  {
+    CORBA::String_var resultID1 = theResult->GetID();
+    SALOMEDS::SObject_var theResSObject = theResult->GetSObject();
+    SALOMEDS::Study_var aStudyDocument = theResSObject->GetStudy();
+    SALOMEDS::SComponent_var aCompSObj = theResSObject->GetFatherComponent();
+    SALOMEDS::ChildIterator_var aChildIter = aStudyDocument->NewChildIterator(aCompSObj);
+    for (aChildIter->InitEx(true); aChildIter->More(); aChildIter->Next())
+    {
+      SALOMEDS::SObject_var aChildSObject = aChildIter->Value();
+      if ( CORBA::is_nil( aChildSObject )) continue;
+      CORBA::Object_var aChildObj = aChildSObject->GetObject();
+      if ( CORBA::is_nil( aChildObj )) continue;
+      VISU::ColoredPrs3dHolder_var prsHolder = ColoredPrs3dHolder::_narrow( aChildObj );
+      if ( prsHolder->_is_nil() ) continue;
+      // check if the prsHolder refers to theResult
+      VISU::ColoredPrs3dHolder::BasicInput_var input = prsHolder->GetBasicInput();
+      CORBA::String_var resultID2 = input->myResult->GetID();
+      if ( strcmp( resultID1, resultID2 ) == 0 )
+        prsHolder->RemoveFromStudy();
+    }
+  }
 
 //---------------------------------------------------------------
 }
@@ -220,6 +245,7 @@ VISU::Result_i
     void
     Execute()
     {
+      RemoveHolders(myRemovable); 
       VISU::RemoveFromStudy(myRemovable->GetSObject(),false);
       myRemovable->UnRegister();
     }
index 7055cb62d08e09fcf0368714f459b6b81fd04b74..c4f8b25879279f161a771a76b0cb59e94509293c 100644 (file)
@@ -84,7 +84,7 @@ void View3D::Display(ScalarMap* theScalarMap){
   if(VISU_ScalarMapPL* aScalarMap = theScalarMap->GetImpl()){
     aScalarMap->Update();
     
-    myRen->RemoveAllProps();
+    myRen->RemoveAllViewProps();
     vtkActor* anActor = vtkActor::New();
     anActor->SetMapper(aScalarMap->GetMapper());