From 288dfec84b00c89e59021362227660d78048035d Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 6 Oct 2016 10:55:17 +0300 Subject: [PATCH] 0023360: [CEA 1963] Use salome.sg.updateObjBrowser(True) instead of salome.sg.updateObjBrowser(1) --- doc/salome/examples/GEOM_box.py | 2 +- doc/salome/examples/arranging_study_objects.py | 2 +- doc/salome/examples/blocks_operations_ex03.py | 2 +- doc/salome/examples/repairing_operations_ex08.py | 2 +- doc/salome/examples/repairing_operations_ex10.py | 2 +- doc/salome/examples/repairing_operations_ex11.py | 2 +- doc/salome/examples/repairing_operations_ex12.py | 2 +- doc/salome/examples/working_with_groups_ex01.py | 2 +- doc/salome/examples/working_with_groups_ex02.py | 2 +- doc/salome/examples/working_with_groups_ex03.py | 2 +- doc/salome/examples/working_with_groups_ex04.py | 2 +- doc/salome/examples/working_with_groups_ex05.py | 2 +- doc/salome/examples/working_with_groups_ex06.py | 2 +- src/GEOM_PY/geomtools.py | 2 +- src/GEOM_SWIG/GEOM_Nut.py | 2 +- src/GEOM_SWIG/GEOM_ObjectInfo.py | 2 +- src/GEOM_SWIG/GEOM_blocks.py | 2 +- src/GEOM_SWIG/GEOM_cyl2complementary.py | 2 +- src/GEOM_SWIG/GEOM_shellSolid.py | 2 +- src/GEOM_SWIG/GEOM_tube_geom.py | 2 +- src/GEOM_SWIG/PAL_MESH_019_020_geometry.py | 2 +- src/GEOM_SWIG/PAL_MESH_028_geometry.py | 2 +- src/GEOM_SWIG/PAL_MESH_030_geometry.py | 2 +- src/GEOM_SWIG/PAL_MESH_033_geometry.py | 2 +- src/GEOM_SWIG/PAL_MESH_035_geometry.py | 2 +- src/GEOM_SWIG/geomBuilder.py | 2 +- src/GEOM_SWIG/gsketcher.py | 2 +- 27 files changed, 27 insertions(+), 27 deletions(-) diff --git a/doc/salome/examples/GEOM_box.py b/doc/salome/examples/GEOM_box.py index 1d9864b2f..7469790b3 100644 --- a/doc/salome/examples/GEOM_box.py +++ b/doc/salome/examples/GEOM_box.py @@ -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) diff --git a/doc/salome/examples/arranging_study_objects.py b/doc/salome/examples/arranging_study_objects.py index bedbe6161..149cff480 100644 --- a/doc/salome/examples/arranging_study_objects.py +++ b/doc/salome/examples/arranging_study_objects.py @@ -22,4 +22,4 @@ geompy.PutListToFolder([Box_1, Cylinder_1], Primitives) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(1) + salome.sg.updateObjBrowser(True) diff --git a/doc/salome/examples/blocks_operations_ex03.py b/doc/salome/examples/blocks_operations_ex03.py index c38bf6c83..384c4e1ae 100644 --- a/doc/salome/examples/blocks_operations_ex03.py +++ b/doc/salome/examples/blocks_operations_ex03.py @@ -20,4 +20,4 @@ for chain in listChains: ii = ii + 1 pass -salome.sg.updateObjBrowser(1) +salome.sg.updateObjBrowser(True) diff --git a/doc/salome/examples/repairing_operations_ex08.py b/doc/salome/examples/repairing_operations_ex08.py index 933298eef..5266bc3a6 100644 --- a/doc/salome/examples/repairing_operations_ex08.py +++ b/doc/salome/examples/repairing_operations_ex08.py @@ -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) diff --git a/doc/salome/examples/repairing_operations_ex10.py b/doc/salome/examples/repairing_operations_ex10.py index 6b8e4280e..bf823db92 100644 --- a/doc/salome/examples/repairing_operations_ex10.py +++ b/doc/salome/examples/repairing_operations_ex10.py @@ -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) diff --git a/doc/salome/examples/repairing_operations_ex11.py b/doc/salome/examples/repairing_operations_ex11.py index 1b50e6ffd..c243e5118 100644 --- a/doc/salome/examples/repairing_operations_ex11.py +++ b/doc/salome/examples/repairing_operations_ex11.py @@ -49,4 +49,4 @@ for wire in wires: ii = ii + 1 pass -salome.sg.updateObjBrowser(1) +salome.sg.updateObjBrowser(True) diff --git a/doc/salome/examples/repairing_operations_ex12.py b/doc/salome/examples/repairing_operations_ex12.py index 80a814a30..4075e1bc1 100644 --- a/doc/salome/examples/repairing_operations_ex12.py +++ b/doc/salome/examples/repairing_operations_ex12.py @@ -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) diff --git a/doc/salome/examples/working_with_groups_ex01.py b/doc/salome/examples/working_with_groups_ex01.py index 26678d58f..4133965f4 100644 --- a/doc/salome/examples/working_with_groups_ex01.py +++ b/doc/salome/examples/working_with_groups_ex01.py @@ -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) diff --git a/doc/salome/examples/working_with_groups_ex02.py b/doc/salome/examples/working_with_groups_ex02.py index 6531cbfc9..773043b88 100644 --- a/doc/salome/examples/working_with_groups_ex02.py +++ b/doc/salome/examples/working_with_groups_ex02.py @@ -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) diff --git a/doc/salome/examples/working_with_groups_ex03.py b/doc/salome/examples/working_with_groups_ex03.py index 0170d54ed..a9637afc7 100644 --- a/doc/salome/examples/working_with_groups_ex03.py +++ b/doc/salome/examples/working_with_groups_ex03.py @@ -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) diff --git a/doc/salome/examples/working_with_groups_ex04.py b/doc/salome/examples/working_with_groups_ex04.py index af9fc6f12..f48fef725 100644 --- a/doc/salome/examples/working_with_groups_ex04.py +++ b/doc/salome/examples/working_with_groups_ex04.py @@ -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) diff --git a/doc/salome/examples/working_with_groups_ex05.py b/doc/salome/examples/working_with_groups_ex05.py index 50af27d5e..551f84755 100644 --- a/doc/salome/examples/working_with_groups_ex05.py +++ b/doc/salome/examples/working_with_groups_ex05.py @@ -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) diff --git a/doc/salome/examples/working_with_groups_ex06.py b/doc/salome/examples/working_with_groups_ex06.py index 27fb6d509..155c4a115 100644 --- a/doc/salome/examples/working_with_groups_ex06.py +++ b/doc/salome/examples/working_with_groups_ex06.py @@ -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) diff --git a/src/GEOM_PY/geomtools.py b/src/GEOM_PY/geomtools.py index 09fba1f7b..a6e18abac 100644 --- a/src/GEOM_PY/geomtools.py +++ b/src/GEOM_PY/geomtools.py @@ -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(): diff --git a/src/GEOM_SWIG/GEOM_Nut.py b/src/GEOM_SWIG/GEOM_Nut.py index 9ea7f94fa..23343c3f7 100755 --- a/src/GEOM_SWIG/GEOM_Nut.py +++ b/src/GEOM_SWIG/GEOM_Nut.py @@ -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) diff --git a/src/GEOM_SWIG/GEOM_ObjectInfo.py b/src/GEOM_SWIG/GEOM_ObjectInfo.py index 6c751fdfd..95705536f 100644 --- a/src/GEOM_SWIG/GEOM_ObjectInfo.py +++ b/src/GEOM_SWIG/GEOM_ObjectInfo.py @@ -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) diff --git a/src/GEOM_SWIG/GEOM_blocks.py b/src/GEOM_SWIG/GEOM_blocks.py index f5cfda578..c33b2c446 100644 --- a/src/GEOM_SWIG/GEOM_blocks.py +++ b/src/GEOM_SWIG/GEOM_blocks.py @@ -42,4 +42,4 @@ smesh = None GEOM_Spanner.MakeSpanner(geompy, math, isBlocksTest, isMeshTest, smesh) -salome.sg.updateObjBrowser(1); +salome.sg.updateObjBrowser(True); diff --git a/src/GEOM_SWIG/GEOM_cyl2complementary.py b/src/GEOM_SWIG/GEOM_cyl2complementary.py index 156ab86ec..8f2fd6f84 100755 --- a/src/GEOM_SWIG/GEOM_cyl2complementary.py +++ b/src/GEOM_SWIG/GEOM_cyl2complementary.py @@ -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 diff --git a/src/GEOM_SWIG/GEOM_shellSolid.py b/src/GEOM_SWIG/GEOM_shellSolid.py index 3cb641ffb..c776a0366 100755 --- a/src/GEOM_SWIG/GEOM_shellSolid.py +++ b/src/GEOM_SWIG/GEOM_shellSolid.py @@ -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 diff --git a/src/GEOM_SWIG/GEOM_tube_geom.py b/src/GEOM_SWIG/GEOM_tube_geom.py index 686ea936a..1a496174d 100755 --- a/src/GEOM_SWIG/GEOM_tube_geom.py +++ b/src/GEOM_SWIG/GEOM_tube_geom.py @@ -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 # diff --git a/src/GEOM_SWIG/PAL_MESH_019_020_geometry.py b/src/GEOM_SWIG/PAL_MESH_019_020_geometry.py index eaccdbe5f..0278053e4 100755 --- a/src/GEOM_SWIG/PAL_MESH_019_020_geometry.py +++ b/src/GEOM_SWIG/PAL_MESH_019_020_geometry.py @@ -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) diff --git a/src/GEOM_SWIG/PAL_MESH_028_geometry.py b/src/GEOM_SWIG/PAL_MESH_028_geometry.py index da1716216..7f1633502 100755 --- a/src/GEOM_SWIG/PAL_MESH_028_geometry.py +++ b/src/GEOM_SWIG/PAL_MESH_028_geometry.py @@ -87,4 +87,4 @@ else: salome.myStudyManager.SaveAs(theFilenameToSave, salome.myStudy, 0) -salome.sg.updateObjBrowser(1) +salome.sg.updateObjBrowser(True) diff --git a/src/GEOM_SWIG/PAL_MESH_030_geometry.py b/src/GEOM_SWIG/PAL_MESH_030_geometry.py index 13b01a41c..e33690b3f 100755 --- a/src/GEOM_SWIG/PAL_MESH_030_geometry.py +++ b/src/GEOM_SWIG/PAL_MESH_030_geometry.py @@ -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) diff --git a/src/GEOM_SWIG/PAL_MESH_033_geometry.py b/src/GEOM_SWIG/PAL_MESH_033_geometry.py index 545fe8704..65111eb68 100755 --- a/src/GEOM_SWIG/PAL_MESH_033_geometry.py +++ b/src/GEOM_SWIG/PAL_MESH_033_geometry.py @@ -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) diff --git a/src/GEOM_SWIG/PAL_MESH_035_geometry.py b/src/GEOM_SWIG/PAL_MESH_035_geometry.py index e694eae03..253951b29 100755 --- a/src/GEOM_SWIG/PAL_MESH_035_geometry.py +++ b/src/GEOM_SWIG/PAL_MESH_035_geometry.py @@ -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) diff --git a/src/GEOM_SWIG/geomBuilder.py b/src/GEOM_SWIG/geomBuilder.py index 54b41f5f6..a7fced187 100644 --- a/src/GEOM_SWIG/geomBuilder.py +++ b/src/GEOM_SWIG/geomBuilder.py @@ -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 diff --git a/src/GEOM_SWIG/gsketcher.py b/src/GEOM_SWIG/gsketcher.py index 4acfde841..965f17c96 100644 --- a/src/GEOM_SWIG/gsketcher.py +++ b/src/GEOM_SWIG/gsketcher.py @@ -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. # @} -- 2.39.2