]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
[bos #38044][EDF] (2023-T3) Support for automatic reparation. Fixed selection level...
authorKonstantin Leontev <Konstantin.LEONTEV@opencascade.com>
Mon, 25 Mar 2024 12:09:19 +0000 (12:09 +0000)
committerKonstantin Leontev <Konstantin.LEONTEV@opencascade.com>
Fri, 14 Jun 2024 17:03:06 +0000 (18:03 +0100)
src/RepairGUIAdv/basedlg.py

index 4566ae8675b59c0ffb5cc31e7c5cb702dc2f40b1..1f92af5edaf1d9731fec3d11c37016b13c5f2703 100644 (file)
@@ -26,7 +26,7 @@ from qtsalome import Qt, QWidget, QMessageBox, QApplication, QGridLayout
 
 from salome.gui import helper
 from salome.kernel.studyedit import EDITOR
-from salome.kernel.services import IDToObject
+from salome.kernel.services import IDToObject, ObjectToID
 from salome.geom import geomBuilder
 from libGEOM_Swig import GEOM_Swig
 import SalomePyQt
@@ -326,7 +326,15 @@ class BaseDlg(Ui_BaseDlg, QWidget):
             source_name = EDITOR.getName(sobject)
             self.set_result_name(self._result_name + source_name)
             self._selected_widget.LineEdit1.setText(source_name)
+
+            # Check if we selected other object in a browser -
+            # we need to set a level flag to init a local selection again
+            prev_entry = ObjectToID(self._selected_object, EDITOR.study)
+            if prev_entry != entry:
+                self._is_level_changed = True
+
             self._selected_object = IDToObject(entry, EDITOR.study)
+
         else:
             self.set_result_name(self._result_name)
             self._selected_widget.LineEdit1.clear()