From 169e37985b4e1aac7b93369361d1ef844814d43f Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 3 Nov 2016 18:14:25 +0300 Subject: [PATCH] minmax_plugin: Don't reset a current control at selection change --- src/SalomeApp/pluginsdemo/minmax_plugin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.39.2