0023360: [CEA 1963] Use salome.sg.updateObjBrowser(True) instead of salome.sg.updateObjBrowser(1)

This commit is contained in:
vsr 2016-10-06 10:55:17 +03:00
parent 75e328d8b1
commit 288dfec84b
27 changed files with 27 additions and 27 deletions

View File

@ -13,4 +13,4 @@ geompy.addToStudy( Box_1, 'Box_1' )
# --- update the study object browser
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -22,4 +22,4 @@ geompy.PutListToFolder([Box_1, Cylinder_1], Primitives)
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -20,4 +20,4 @@ for chain in listChains:
ii = ii + 1
pass
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -30,4 +30,4 @@ geompy.addToStudy(glue1, "Glue all edges")
geompy.addToStudy(glue2, "Glue two edges")
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -40,4 +40,4 @@ edge = geompy.GetEdgeNearPoint( box, p1, theName="edge to split")
div = geompy.DivideEdgeByPoint( box, edge, [p1, p2], theName="box (edge divided)")
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -49,4 +49,4 @@ for wire in wires:
ii = ii + 1
pass
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -23,4 +23,4 @@ geompy.addToStudy(Partition_1, 'Partition_1')
Joined_1 = geompy.RemoveInternalFaces(Partition_1)
geompy.addToStudy(Joined_1, 'Joined_1')
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -37,4 +37,4 @@ id_group1 = geompy.addToStudy(group, "Group1")
# display the contents of the group
gg.createAndDisplayGO(id_group1)
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -26,4 +26,4 @@ id_group1 = geompy.addToStudy(group, "Group1")
# display the contents of the group
gg.createAndDisplayGO(id_group1)
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -33,4 +33,4 @@ id_group1 = geompy.addToStudy(group, "Group1")
# display the contents of the group
gg.createAndDisplayGO(id_group1)
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -29,4 +29,4 @@ geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
geompy.addToStudyInFather(Box_1, Group_U_1_2, 'Group_U_1_2')
geompy.addToStudyInFather(Box_1, Group_UL_3_4, 'Group_UL_3_4')
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -29,4 +29,4 @@ geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
geompy.addToStudyInFather(Box_1, Group_I_1_3, 'Group_I_1_3')
geompy.addToStudyInFather(Box_1, Group_IL_1_3, 'Group_IL_1_3')
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -29,4 +29,4 @@ geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
geompy.addToStudyInFather(Box_1, Group_C_2_4, 'Group_C_2_4')
geompy.addToStudyInFather(Box_1, Group_CL_2_4, 'Group_CL_2_4')
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -337,7 +337,7 @@ def TEST_createBox():
box = geompy.MakeBoxDXDYDZ(200, 200, 200)
geompy.addToStudy( box, 'box' )
if salome.sg.hasDesktop():
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)
def TEST_getGeomObjectSelected():

View File

@ -91,5 +91,5 @@ geompy.addToStudy(theShapeForCut, "slot.brep_1")
Cut_1 = geompy.MakeBoolean(Chamfer_2, theShapeForCut, 2)
geompy.addToStudy(Cut_1, "Cut_1")
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -55,4 +55,4 @@ if hasInfo == True:
print "Information about fourth object: ", geompy.getObjectInfo(salome.myStudyId, obj4_entry)
print "Information about fifth object: ", geompy.getObjectInfo(salome.myStudyId, obj5_entry)
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -42,4 +42,4 @@ smesh = None
GEOM_Spanner.MakeSpanner(geompy, math, isBlocksTest, isMeshTest, smesh)
salome.sg.updateObjBrowser(1);
salome.sg.updateObjBrowser(True);

View File

@ -41,7 +41,7 @@ geomgui = salome.ImportComponentGUI("GEOM")
import salome_ComponentGUI
def addToStudy(shape, name):
i = geompy.addToStudy(shape, name)
salome.sg.updateObjBrowser(0)
salome.sg.updateObjBrowser(False)
if not isinstance(geomgui, type(salome_ComponentGUI)):
geomgui.createAndDisplayGO(i)
return i

View File

@ -48,7 +48,7 @@ geomgui = salome.ImportComponentGUI("GEOM")
def addToStudy(shape, name):
i = geompy.addToStudy(shape, name)
salome.sg.updateObjBrowser(0)
salome.sg.updateObjBrowser(False)
# geomgui.createAndDisplayGO(i)
return i

View File

@ -159,7 +159,7 @@ weldId = geompy.addToStudy(weld,"weld")
#
assemblage = geompy.Partition([base ,weld ,trav])
assemblageId = geompy.addToStudy(assemblage, "assemblage")
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)
#
# Display
#

View File

@ -57,4 +57,4 @@ geompy.addToStudy(Curve_1, "Curve_1")
Line_1 = geompy.MakeLineTwoPnt(Vertex_4, Vertex_5)
geompy.addToStudy(Line_1, "Line_1")
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -87,4 +87,4 @@ else:
salome.myStudyManager.SaveAs(theFilenameToSave, salome.myStudy, 0)
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -80,4 +80,4 @@ id_Face_4 = geompy.addToStudyInFather(Compound_1,Compound_1_faces[3], "Face_4")
id_Compound_2 = geompy.addToStudy(Compound_2, "Compound_2")
id_Solid_2 = geompy.addToStudyInFather(Compound_2,Compound_2_solids[1], "Solid_2")
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -63,4 +63,4 @@ geompy.addToStudy(Edge_4, "Edge_4")
Wire_1 = geompy.MakeWire([Edge_1, Edge_2, Edge_3, Edge_4])
geompy.addToStudy(Wire_1, "Wire_1")
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -111,4 +111,4 @@ for i in range (0, NbExplodedVertices_Face_18):
name = "Vertex_" + str(NbExplodedVertices_Box_1+NbExplodedVertices_Face_7+NbExplodedVertices_Face_10+NbExplodedVertices_Face_15+i+1)
geompy.addToStudyInFather(ListOfFaces_Partition_1[NbExplodedFaces_Partition_1-1], ListOfVertices_Face_18[i], name)
salome.sg.updateObjBrowser(1)
salome.sg.updateObjBrowser(True)

View File

@ -13408,7 +13408,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
+ left_str + "length" + right_str + `max_length`)
sg.updateObjBrowser(1)
sg.updateObjBrowser(True)
return group_edges

View File

@ -48,7 +48,7 @@
# geompy.addToStudy( Sketch_1, 'Sketch_1' )
#
# # update object browser
# salome.sg.updateObjBrowser(1)
# salome.sg.updateObjBrowser(True)
# @endcode
# @n Additionnal examples can be found as unit tests in the source code.
# @}