@@ -156,9 +156,10 @@ def handleRemove(self):
156156 # If there's no results left, we need an empty one.
157157 if len (self .results ) == 0 :
158158 self .results .append (self .initResult ())
159+ self .clearGuiValues ()
159160 self .enableButtons ()
160161 self .updateGuiValues ()
161-
162+
162163 def handleCurrentDataChanged (self ):
163164 # This event might get called before there is anything in the results list. But we can't update the GUI without
164165 # errors.
@@ -290,6 +291,29 @@ def updateGuiValues(self):
290291 self .posFractionValue .setText (format_float (out .pos_frac ))
291292 self .sigmaPosFractionValue .setText (format_float (out .pos_err ))
292293
294+ def clearGuiValues (self ):
295+ #self.noOfTermsSuggestionButton.setText("")
296+ #self.regConstantSuggestionButton.setText("")
297+
298+ self .noOfTermsInput .setText ("" )
299+ self .regularizationConstantInput .setText ("" )
300+ self .maxDistanceInput .setText ("" )
301+
302+ self .minQInput .setText ("" )
303+ self .maxQInput .setText ("" )
304+ self .slitHeightInput .setText ("" )
305+ self .slitWidthInput .setText ("" )
306+
307+ self .rgValue .setText ("" )
308+ self .iQ0Value .setText ("" )
309+ self .backgroundValue .setText ("" )
310+ self .backgroundInput .setText ("" )
311+ self .computationTimeValue .setText ("" )
312+ self .chiDofValue .setText ("" )
313+ self .oscillationValue .setText ("" )
314+ self .posFractionValue .setText ("" )
315+ self .sigmaPosFractionValue .setText ("" )
316+
293317 def setupValidators (self ):
294318 """Apply validators to editable line edits"""
295319 self .noOfTermsInput .setValidator (QIntValidator ())
0 commit comments