From 38870802745960964b29a0db533a6579bcec1d05 Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Sun, 18 Jan 2015 15:42:28 -0200 Subject: [PATCH] Wait before deleting __objs__ (Werner can you check if its Ok? Thanks) --- src/Gui/Application.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 600d1a6fa..39c2000a8 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -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