Main: Use PyObject_IsTrue in combination with conditional ternary operator
This commit is contained in:
committed by
Chris Hennes
parent
89803987a1
commit
ccfa6cd9e5
@@ -101,7 +101,7 @@ FreeCADGui_showMainWindow(PyObject * /*self*/, PyObject *args)
|
||||
|
||||
static bool thr = false;
|
||||
if (!qApp) {
|
||||
if (PyObject_IsTrue(inThread) && !thr) {
|
||||
if ((PyObject_IsTrue(inThread) ? true : false) && !thr) {
|
||||
thr = true;
|
||||
std::thread t([]() {
|
||||
static int argc = 0;
|
||||
|
||||
Reference in New Issue
Block a user