Skip to content

Commit

Permalink
- Moved get/setSourceFile to ModelicaBuiltin.mo
Browse files Browse the repository at this point in the history
  - Slightly changed their output (from Ok/error to true/false and filename to "filename")
  - Updated OMEdit to consider these changes


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10189 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Oct 21, 2011
1 parent 9cd09e9 commit 29badad
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions OMEdit/OMEditGUI/OMCProxy.cpp
Expand Up @@ -1156,19 +1156,17 @@ bool OMCProxy::deleteClass(QString className)
QString OMCProxy::getSourceFile(QString modelName)
{
sendCommand("getSourceFile(" + modelName + ")");
if (getResult().contains("<interactive>"))
return "";
QString file = StringHandler::unparse(getResult());
if (file == "<interactive>")
return "";
else
return getResult();
return file;
}

bool OMCProxy::setSourceFile(QString modelName, QString path)
{
sendCommand("setSourceFile(" + modelName + ", \"" + path + "\")");
if (getResult().toLower().contains("ok"))
return true;
else
return false;
return StringHandler::unparseBool(getResult());
}

bool OMCProxy::save(QString modelName)
Expand Down

0 comments on commit 29badad

Please sign in to comment.