Salome HOME
merge with master
[tools/sat.git] / data / templates / PythonComponent8 / src / PYCMPGUI / PYCMPGUI.py
index f33ec81be3cf7e3e87acb1facfb5944186d6b4d8..71a4e0f7e726be2eea9513f22f9fc8e9fe9665c5 100755 (executable)
@@ -87,7 +87,7 @@ def setDesktop( studyID ):
 
     global moduleDesktop, currentDesktop, objectsManager
 
-    if not moduleDesktop.has_key( studyID ):
+    if not studyID in moduleDesktop:
         moduleDesktop[studyID] = :sat:{PYCMP}Desktop( sgPyQt, sg )
         objectsManager = Controller( moduleDesktop[studyID] )
         moduleDesktop[studyID].setController( objectsManager )
@@ -181,7 +181,7 @@ def createPopupMenu( popup, context ):
 def OnGUIEvent( commandID ):
     """This method is called when a GUI action is activated"""
 
-    if dict_command.has_key( commandID ):
+    if commandID in dict_command:
        dict_command[commandID]()
        pass
     pass