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
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()