Changeset 17968c3 in sasview for src/sas/qtgui/Perspectives
- Timestamp:
- Jan 26, 2018 5:52:20 AM (7 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 9c0ce68
- Parents:
- c6343a5
- Location:
- src/sas/qtgui/Perspectives/Fitting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Perspectives/Fitting/ConstraintWidget.py
rc6343a5 r17968c3 181 181 # start the trhrhread with twisted 182 182 calc_thread = threads.deferToThread(calc_fit.compute) 183 calc_thread.addCallback( self.onFitComplete)183 calc_thread.addCallback(completefn) 184 184 calc_thread.addErrback(self.onFitFailed) 185 185 #else: … … 296 296 Respond to the successful fit complete signal 297 297 """ 298 #re-enable the Fit button 299 self.cmdFit.setText("Fit") 300 self.cmdFit.setEnabled(True) 301 298 302 # get the elapsed time 299 303 elapsed = result[1] … … 315 319 tab_object.fitComplete(([[results[i]]], elapsed)) 316 320 321 msg = "Fitting completed successfully in: %s s.\n" % GuiUtils.formatNumber(elapsed) 322 self.parent.communicate.statusBarUpdateSignal.emit(msg) 323 317 324 def onBatchFitComplete(self, result): 318 325 """ 319 326 Respond to the successful batch fit complete signal 320 327 """ 328 #re-enable the Fit button 329 self.cmdFit.setText("Fit") 330 self.cmdFit.setEnabled(True) 331 332 # get the elapsed time 333 elapsed = result[1] 334 335 # ADD THE BATCH FIT VIEW HERE 336 # 337 338 msg = "Fitting completed successfully in: %s s.\n" % GuiUtils.formatNumber(elapsed) 339 self.parent.communicate.statusBarUpdateSignal.emit(msg) 340 321 341 pass 322 342 323 343 def onFitFailed(self, reason): 324 344 """ 325 """ 326 print("FIT FAILED: ", reason) 345 Respond to fitting failure. 346 """ 347 #re-enable the Fit button 348 self.cmdFit.setText("Fit") 349 self.cmdFit.setEnabled(True) 350 351 msg = "Fitting failed: %s s.\n" % reason 352 self.parent.communicate.statusBarUpdateSignal.emit(msg) 327 353 pass 328 354 -
src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py
r116dd4c1 r17968c3 236 236 raise AttributeError(msg) 237 237 238 if is_batch: 239 # Just create a new fit tab. No empty batchFit tabs 240 self.addFit(data_item, is_batch=is_batch) 241 return 242 238 243 items = [data_item] if is_batch else data_item 239 240 244 for data in items: 241 245 # Find the first unassigned tab. 242 246 # If none, open a new tab. 243 available_tabs = list([tab.acceptsData() for tab in self.tabs])247 available_tabs = [tab.acceptsData() for tab in self.tabs] 244 248 245 249 if numpy.any(available_tabs):
Note: See TracChangeset
for help on using the changeset viewer.