From 84b5539159113d025d9111f611e858bdac14b20a Mon Sep 17 00:00:00 2001 From: DUC ANH HOANG Date: Mon, 24 Apr 2023 10:02:49 +0200 Subject: [PATCH] taking into account salome-gui interactive feature for each component --- src/LightApp/LightApp_Application.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 454bf37c9..314e2dd24 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -975,14 +975,16 @@ void LightApp_Application::onExtAdding() continue; } + PyObjWrapper pKeys = PyDict_Keys(unpackedModules); // Iterate all the components (modules) for this extension - for (Py_ssize_t pos = 0; pos < PyList_Size(unpackedModules); ++pos) + for (Py_ssize_t pos = 0; pos < PyDict_Size(unpackedModules); ++pos) { - auto moduleNameItem = PyList_GetItem(unpackedModules, pos); + auto moduleNameItem = PyList_GetItem(pKeys, pos); + auto interactiveItem = PyDict_GetItem(unpackedModules, moduleNameItem); + QString moduleName(PyUnicode_AsUTF8(moduleNameItem)); SCRUTE(moduleName.toStdString()); - - addUserModule(moduleName, SalomeExtDir, true); + addUserModule(moduleName, SalomeExtDir, PyObject_IsTrue(interactiveItem)); } // Add an extension to GUI -- 2.39.2