Salome HOME
py2yacsgui now produces an xml file on exit.
[modules/yacs.git] / src / py2yacsgui / Py2YacsModel.cxx
index d628edccc8c778aee0d062775357c8bf64e6530d..9a0c7f27e90f8a645d504bf5edd2ad0fb7bc46e9 100644 (file)
@@ -139,8 +139,9 @@ const std::string& Py2YacsModel::getLastError()
   return _lastError;
 }
 
-void Py2YacsModel::exportToXml(const std::string& path)
+bool Py2YacsModel::exportToXml(const std::string& path)
 {
+  bool ok = true;
   if(schemaAvailable())
   {
     try
@@ -151,9 +152,11 @@ void Py2YacsModel::exportToXml(const std::string& path)
     {
       _lastError = e.what();
       _lastError += "\n";
+      ok = false;
     }
   }
   emit errorChanged(_lastError.c_str());
+  return ok;
 }
 
 void Py2YacsModel::setFunctionName(const QString& functionName)