]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
CCAR: fix bug in salome plugins manager. Menus now appear in all studies not only...
authorcaremoli <caremoli>
Wed, 17 Nov 2010 18:05:08 +0000 (18:05 +0000)
committercaremoli <caremoli>
Wed, 17 Nov 2010 18:05:08 +0000 (18:05 +0000)
src/SalomeApp/salome_pluginsmanager.py

index 00199335d0cb8a5051afa8db928576c3e9fb609b..da726a8374e402c57af1170a1f36a02207dac74b 100644 (file)
@@ -77,12 +77,21 @@ plugins={}
 current_plugins_manager=None
 
 def initialize(module,name,basemenuname,menuname):
-  if plugins.has_key(name):return
-  plugins[name]=PluginsManager(module,name,basemenuname,menuname)
+  if not plugins.has_key(name):
+    if module:
+      plugins[name]={}
+    else:
+      plugins[name]=[]
+  if module:
+    studyId=sg.getActiveStudyId()
+    if plugins[name].has_key(studyId):return
+    plugins[name][studyId]=PluginsManager(module,name,basemenuname,menuname)
+  else:
+    plugins[name].append(PluginsManager(module,name,basemenuname,menuname))
 
 class Context:
-    def __init__(self,sg):
-        self.sg=sg
+    def __init__(self,sgpyqt):
+        self.sg=sgpyqt
         self.studyId=salome.sg.getActiveStudyId()
         self.study= salome.myStudyManager.GetStudyByID(self.studyId)