Skip to content

Commit

Permalink
Wait before deleting __objs__ (Werner can you check if its Ok? Thanks)
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jan 18, 2015
1 parent 767d7b4 commit 3887080
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Gui/Application.cpp
Expand Up @@ -591,12 +591,15 @@ void Application::exportTo(const char* FileName, const char* DocName, const char

str << "import " << Module << std::endl;
str << Module << ".export(__objs__,u\"" << unicodepath << "\")" << std::endl;
str << "del __objs__" << std::endl;
//str << "del __objs__" << std::endl;

std::string code = str.str();
// the original file name is required
if (runPythonCode(code.c_str(), false))
getMainWindow()->appendRecentFile(QString::fromUtf8(File.filePath().c_str()));

// allow exporters to pass _objs__ to submodules before deleting it
runPythonCode("del __objs__", false);
}
catch (const Base::PyException& e){
// Usually thrown if the file is invalid somehow
Expand Down

0 comments on commit 3887080

Please sign in to comment.