z = 0;
if( sscanf( aLine.c_str(), "%lf %lf %lf", &x, &y, &z )!=3 )
+ {
+ aFile.close();
return false;
+ }
if (!AddXYZ(bImportXY, x, y, z, thePointsXYZ, thePointsXY ))
+ {
+ aFile.close();
return false;
+ }
}
}
else if (aFileSuf == "xy" )
y = 0;
if( sscanf( aLine.c_str(), "%lf %lf", &x, &y )!=2 )
+ {
+ aFile.close();
return false;
+ }
if (!AddXYZ(true, x, y, 0, thePointsXYZ, thePointsXY ))
+ {
+ aFile.close();
return false;
+ }
}
}
}
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;