From: eap Date: Thu, 3 Nov 2016 15:14:25 +0000 (+0300) Subject: minmax_plugin: Don't reset a current control at selection change X-Git-Tag: V8_2_0a1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=169e37985b4e1aac7b93369361d1ef844814d43f;p=modules%2Fgui.git minmax_plugin: Don't reset a current control at selection change --- diff --git a/src/SalomeApp/pluginsdemo/minmax_plugin.py b/src/SalomeApp/pluginsdemo/minmax_plugin.py index 59d143b41..1b0719bb1 100644 --- a/src/SalomeApp/pluginsdemo/minmax_plugin.py +++ b/src/SalomeApp/pluginsdemo/minmax_plugin.py @@ -104,7 +104,6 @@ def minmax(context): def select(self): sg.getObjectBrowser().selectionChanged.disconnect(self.select) - self.ui.control.clear() self.ui.minvalue.setText("") self.ui.maxvalue.setText("") objId = salome.sg.getSelected(0) @@ -136,7 +135,9 @@ def minmax(context): if v: controls += controls_3d pass - self.ui.control.addItems(controls) + if self.ui.control.count() != len( controls ): + self.ui.control.clear() + self.ui.control.addItems(controls) self.compute_minmax() sg.getObjectBrowser().selectionChanged.connect(self.select) pass