]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
taking into account salome-gui interactive feature for each component
authorDUC ANH HOANG <duc-anh-externe.hoang@edf.fr>
Mon, 24 Apr 2023 08:02:49 +0000 (10:02 +0200)
committerDUC ANH HOANG <duc-anh-externe.hoang@edf.fr>
Mon, 24 Apr 2023 08:02:49 +0000 (10:02 +0200)
src/LightApp/LightApp_Application.cxx

index 454bf37c9b87cdcc6c6ca66dc9c02cf23f30018b..314e2dd24f457f4e2cb9ba50c3de5d82fe01fa63 100644 (file)
@@ -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