]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
minmax_plugin: Don't reset a current control at selection change
authoreap <eap@opencascade.com>
Thu, 3 Nov 2016 15:14:25 +0000 (18:14 +0300)
committereap <eap@opencascade.com>
Thu, 3 Nov 2016 15:14:25 +0000 (18:14 +0300)
src/SalomeApp/pluginsdemo/minmax_plugin.py

index 59d143b417e245363ce4cf379780529208884038..1b0719bb17dda572d2741c9358fab35778a95b18 100644 (file)
@@ -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