Salome HOME
Feature #86: The hierarchy in the Object Browser (T 19).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_CalculationOp.cxx
index 192e5559f87a367eca823cc29b4ea7457e615956..707a308655bc1726839d9f5aa9a70db953a4e33b 100644 (file)
@@ -93,12 +93,16 @@ void HYDROGUI_CalculationOp::startOperation()
     aPolylineObj = Handle(HYDROData_Polyline)::DownCast( anIter.Current() );
 
     if ( !aPolylineObj.IsNull() && aPolylineObj->IsClosed() )
-    {
-      aPolylineName = aPolylineObj->GetName();
-      if ( !aPolylineName.isEmpty() )
-      {
-        aList.append( aPolylineName );
-        anEntryList.append( HYDROGUI_DataObject::dataObjectEntry( aPolylineObj ) );
+    { 
+      // Check the polyline shape
+      TopoDS_Shape aPolylineShape = aPolylineObj->GetTopShape();
+      if ( !aPolylineShape.IsNull() && aPolylineShape.ShapeType() == TopAbs_WIRE ) {
+        aPolylineName = aPolylineObj->GetName();
+        if ( !aPolylineName.isEmpty() )
+        {
+          aList.append( aPolylineName );
+          anEntryList.append( HYDROGUI_DataObject::dataObjectEntry( aPolylineObj ) );
+        }
       }
     }
   }