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

This commit is contained in:
rnc 2013-12-03 15:05:31 +00:00
parent 15e0993d69
commit 271a3fb6bb

View File

@ -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
#