avoid to eventually try to init Gui twice

This commit is contained in:
wmayer
2017-07-10 20:51:30 +02:00
parent d31be3117d
commit 349f8b5ff9

View File

@@ -326,7 +326,10 @@ PyMOD_INIT_FUNC(FreeCADGui)
App::Application::Config()["AppIcon"] = "freecad";
App::Application::Config()["SplashScreen"] = "freecadsplash";
App::Application::Config()["CopyrightInfo"] = "\xc2\xa9 Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2017\n";
Gui::Application::initApplication();
// it's possible that the GUI is already initialized when the Gui version of the executable
// is started in command mode
if (Base::Type::fromName("Gui::BaseView").isBad())
Gui::Application::initApplication();
#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef FreeCADGuiModuleDef = {
PyModuleDef_HEAD_INIT,