studyManager.palStudy.setCurrentStudyID( activeStudyId )
return True
+
def __createOCCView( self ):
"""
"""
#salome.salome_init()
import iparameters
- ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))
+
+ # On détermine le nombre de GUI states déjà présents dans l'arbre d'étude
+ GUIStateID = 1
+
+ ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", GUIStateID))
+ properties = ipar.getProperties()
+
+ while properties != []:
+ GUIStateID += 1
+ ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", GUIStateID))
+ properties = ipar.getProperties()
+ print "GUIStateID: ", GUIStateID
+
#Set up visual properties:
ipar.setProperty("AP_ACTIVE_VIEW", "OCCViewer_0_0")
ipar.setProperty("AP_WORKSTACK_INFO", "(splitter orientation=0 sizes=1045 (views active='OCCViewer_0_0' 'OCCViewer_0_0'))")
- ipar.setProperty("AP_SAVEPOINT_NAME", "GUI state: 1")
+ ipar.setProperty("AP_SAVEPOINT_NAME", "GUI state: %i"%(GUIStateID))
#Set up lists:
# fill list AP_VIEWERS_LIST
ipar.append("AP_VIEWERS_LIST", "OCCViewer_1")
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)
- iparameters.getSession().restoreVisualState(1)
+ iparameters.getSession().restoreVisualState(GUIStateID)
def __selectWorkingMesh( self, meshGroupEntries ):
ok, msgError = self.displayMeshGroups(shapeName)
else: #geometrie
print 'Vue courante = OCC : affichage element geometrique'
- self.__createOCCView()
+# self.__createOCCView()
current_color = COLORS[ self.icolor % LEN_COLORS ]
ok = studyManager.palStudy.displayShapeByName( shapeName, current_color )
salome.sg.FitAll()