From 271a3fb6bb3074155e44fc7b7efb04a02c34c4f0 Mon Sep 17 00:00:00 2001 From: rnc Date: Tue, 3 Dec 2013 15:05:31 +0000 Subject: [PATCH] BUG: Yams plugin: Dialog input values were not reset to default when closing and reopening it + verbose level spinbox was connected to max memory by mistake --- src/Tools/YamsPlug/monYamsPlugDialog.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Tools/YamsPlug/monYamsPlugDialog.py b/src/Tools/YamsPlug/monYamsPlugDialog.py index f27bc22b5..44cce78ca 100644 --- a/src/Tools/YamsPlug/monYamsPlugDialog.py +++ b/src/Tools/YamsPlug/monYamsPlugDialog.py @@ -401,7 +401,11 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): mySObject, myEntry = guihelper.getSObjectSelected() if CORBA.is_nil(mySObject) or mySObject==None: - QMessageBox.critical(self, "Mesh", "select an input mesh") + #QMessageBox.critical(self, "Mesh", "select an input mesh") + self.LE_MeshSmesh.setText("") + self.MeshIn="" + self.LE_MeshFile.setText("") + self.fichierIn="" return self.smeshStudyTool = SMeshStudyTools() try: @@ -477,7 +481,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): if self.SP_MinSize.value() != 5 : self.commande+=" --min_size %f" %self.SP_MinSize.value() if self.SP_Gradation.value() != 1.3 : self.commande+=" --gradation %f" %self.SP_MaxSize.value() if self.SP_Memory.value() != 0 : self.commande+=" --max_memory %d" %self.SP_Memory.value() - if self.SP_Verbosity.value() != 3 : self.commande+=" --max_memory %d" %self.SP_Verbosity.value() + if self.SP_Verbosity.value() != 3 : self.commande+=" --verbose %d" %self.SP_Verbosity.value() self.commande+=" --in " + self.fichierIn self.commande+=" --out " + self.fichierOut @@ -507,18 +511,20 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): self.SP_MinSize.setProperty("value", -2.0) self.SP_Verbosity.setProperty("value", 3) self.SP_Memory.setProperty("value", 0) + self.PBMeshSmeshPressed() + self.TWOptions.setCurrentIndex(0) # Reset current active tab to the first tab __dialog=None def getDialog(): """ This function returns a singleton instance of the plugin dialog. - c est obligatoire pour faire un show sans parent... + It is mandatory in order to call show witout a parent ... """ global __dialog if __dialog is None: __dialog = MonYamsPlugDialog() - #else : - # __dialog.clean() + else : + __dialog.clean() return __dialog #