Py3: fixes #0004081: Abillity to show console output when running under Python

This commit is contained in:
wmayer
2021-04-01 17:51:10 +02:00
parent b64c4da51b
commit 377b01b4b4
2 changed files with 15 additions and 3 deletions

View File

@@ -152,6 +152,14 @@ FreeCADGui_showMainWindow(PyObject * /*self*/, PyObject *args)
}
}
// if successful then enable Console logger
Base::ILogger *console = Base::Console().Get("Console");
if (console) {
console->bMsg = true;
console->bWrn = true;
console->bErr = true;
}
Py_INCREF(Py_None);
return Py_None;
}