Changes in / [60e20d8:f810eb6] in sasview
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/ConstraintWidget.py
r14e1ff0 r13ee4d9 128 128 self.is_chain_fitting = False 129 129 130 # Is the fit job running?131 self.is_running = False132 self.calc_fit = None133 134 130 # Remember previous content of modified cell 135 131 self.current_cell = "" … … 261 257 Perform the constrained/simultaneous fit 262 258 """ 263 # Stop if we're running264 if self.is_running:265 self.is_running = False266 #re-enable the Fit button267 self.cmdFit.setStyleSheet('QPushButton {color: black;}')268 self.cmdFit.setText("Fit")269 # stop the fitpages270 self.calc_fit.stop()271 return272 273 259 # Find out all tabs to fit 274 260 tabs_to_fit = self.getTabsForFit() … … 324 310 325 311 # new fit thread object 326 self.calc_fit = FitThread(handler=handler,312 calc_fit = FitThread(handler=handler, 327 313 fn=sim_fitter_list, 328 314 batch_inputs=batch_inputs, … … 335 321 if LocalConfig.USING_TWISTED: 336 322 # start the trhrhread with twisted 337 self.calc_fit = threads.deferToThread(self.calc_fit.compute)338 self.calc_fit.addCallback(completefn)339 self.calc_fit.addErrback(self.onFitFailed)323 calc_thread = threads.deferToThread(calc_fit.compute) 324 calc_thread.addCallback(completefn) 325 calc_thread.addErrback(self.onFitFailed) 340 326 else: 341 327 # Use the old python threads + Queue 342 self.calc_fit.queue() 343 self.calc_fit.ready(2.5) 344 345 # modify the Fit button 328 calc_fit.queue() 329 calc_fit.ready(2.5) 330 331 332 #disable the Fit button 346 333 self.cmdFit.setStyleSheet('QPushButton {color: red;}') 347 self.cmdFit.setText(' Stop fit')334 self.cmdFit.setText('Running...') 348 335 self.parent.communicate.statusBarUpdateSignal.emit('Fitting started...') 349 self. is_running = True336 self.cmdFit.setEnabled(False) 350 337 351 338 def onHelp(self): … … 470 457 self.cmdFit.setStyleSheet('QPushButton {color: black;}') 471 458 self.cmdFit.setText("Fit") 459 self.cmdFit.setEnabled(True) 472 460 473 461 # Notify the parent about completed fitting … … 515 503 self.cmdFit.setStyleSheet('QPushButton {color: black;}') 516 504 self.cmdFit.setText("Fit") 505 self.cmdFit.setEnabled(True) 517 506 518 507 # Notify the parent about completed fitting … … 549 538 self.cmdFit.setStyleSheet('QPushButton {color: black;}') 550 539 self.cmdFit.setText("Fit") 540 self.cmdFit.setEnabled(True) 551 541 552 542 # Notify the parent about completed fitting -
src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
r14e1ff0 rfb39f28 406 406 tab_object.enableInteractiveElements() 407 407 408 pass 409 408 410 def getCurrentStateAsXml(self): 409 411 """
Note: See TracChangeset
for help on using the changeset viewer.