Salome HOME
lot 10 - warnings for DTM - untested
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ImportPolylineOp.cxx
index 6697b42010576b0f68c513458fd002f654cf7009..8889bd5c45d786d185948146f1d5f6474c5e562e 100644 (file)
@@ -199,11 +199,13 @@ NCollection_Sequence<Handle(HYDROData_Entity)> HYDROGUI_ImportPolylineOp::Import
     }
     else if ( anExt == "xy" || (importXY && anExt == "xyz"))
     {
-      HYDROData_Tool::importPolylineFromXYZ(aFileName, theDocument, true, importedEntities);   
+      if (!HYDROData_Tool::importPolylineFromXYZ(aFileName, theDocument, true, importedEntities))
+        SUIT_MessageBox::warning( module->getApp()->desktop(), tr( "IMPORT_POLYLINE" ), tr( "NO_ONE_POLYLINE_IMPORTED" ));
     }
     else if (anExt == "xyz")
     {
-      HYDROData_Tool::importPolylineFromXYZ(aFileName, theDocument, false, importedEntities);
+      if (!HYDROData_Tool::importPolylineFromXYZ(aFileName, theDocument, false, importedEntities))
+        SUIT_MessageBox::warning( module->getApp()->desktop(), tr( "IMPORT_POLYLINE" ), tr( "NO_ONE_POLYLINE_IMPORTED" ));
     }
   }
   return importedEntities;