workaround for bug in VS 2013 that occurs at Python init time

This commit is contained in:
wmayer
2018-04-15 19:05:06 +02:00
parent 4adeb7702d
commit 7ed84a6590
3 changed files with 38 additions and 1 deletions

View File

@@ -1032,6 +1032,7 @@ bool Application::activateWorkbench(const char* name)
if (oldWb && oldWb->name() == name)
return false; // already active
Base::PyGILStateLocker lock;
// we check for the currently active workbench and call its 'Deactivated'
// method, if available
PyObject* pcOldWorkbench = 0;
@@ -1040,7 +1041,6 @@ bool Application::activateWorkbench(const char* name)
}
// get the python workbench object from the dictionary
Base::PyGILStateLocker lock;
PyObject* pcWorkbench = 0;
pcWorkbench = PyDict_GetItemString(_pcWorkbenchDictionary, name);
// test if the workbench exists