Changeset 60e20d8 in sasview


Ignore:
Timestamp:
Mar 26, 2019 8:28:41 AM (9 months ago)
Author:
GitHub <noreply@…>
Branches:
ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl
Children:
bad4a52, 5d14851a
Parents:
14e1ff0 (diff), f810eb6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Piotr Rozyczko <piotr.rozyczko@…> (03/26/19 08:28:41)
git-committer:
GitHub <noreply@…> (03/26/19 08:28:41)
Message:

Merge pull request #214 from rprospero/Sasview-1127

Sasview 1127 - Changing fit parameters reverts y axis back to linear

Location:
src/sas/qtgui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Plotting/Plotter.py

    rd9e7792 r4c11b2a  
    420420        This effectlvely refreshes the chart with changes to one of its plots 
    421421        """ 
     422 
     423        # Pull the current transform settings from the old plot 
     424        selected_plot = self.plot_dict[id] 
     425        new_plot.xtransform = selected_plot.xtransform 
     426        new_plot.ytransform = selected_plot.ytransform 
     427 
    422428        self.removePlot(id) 
    423429        self.plot(data=new_plot) 
  • src/sas/qtgui/Perspectives/Fitting/ConstraintWidget.py

    r13ee4d9 r14e1ff0  
    128128        self.is_chain_fitting = False 
    129129 
     130        # Is the fit job running? 
     131        self.is_running = False 
     132        self.calc_fit = None 
     133 
    130134        # Remember previous content of modified cell 
    131135        self.current_cell = "" 
     
    257261        Perform the constrained/simultaneous fit 
    258262        """ 
     263        # Stop if we're running 
     264        if self.is_running: 
     265            self.is_running = False 
     266            #re-enable the Fit button 
     267            self.cmdFit.setStyleSheet('QPushButton {color: black;}') 
     268            self.cmdFit.setText("Fit") 
     269            # stop the fitpages 
     270            self.calc_fit.stop() 
     271            return 
     272 
    259273        # Find out all tabs to fit 
    260274        tabs_to_fit = self.getTabsForFit() 
     
    310324 
    311325        # new fit thread object 
    312         calc_fit = FitThread(handler=handler, 
     326        self.calc_fit = FitThread(handler=handler, 
    313327                             fn=sim_fitter_list, 
    314328                             batch_inputs=batch_inputs, 
     
    321335        if LocalConfig.USING_TWISTED: 
    322336            # start the trhrhread with twisted 
    323             calc_thread = threads.deferToThread(calc_fit.compute) 
    324             calc_thread.addCallback(completefn) 
    325             calc_thread.addErrback(self.onFitFailed) 
     337            self.calc_fit = threads.deferToThread(self.calc_fit.compute) 
     338            self.calc_fit.addCallback(completefn) 
     339            self.calc_fit.addErrback(self.onFitFailed) 
    326340        else: 
    327341            # Use the old python threads + Queue 
    328             calc_fit.queue() 
    329             calc_fit.ready(2.5) 
    330  
    331  
    332         #disable the Fit button 
     342            self.calc_fit.queue() 
     343            self.calc_fit.ready(2.5) 
     344 
     345        # modify the Fit button 
    333346        self.cmdFit.setStyleSheet('QPushButton {color: red;}') 
    334         self.cmdFit.setText('Running...') 
     347        self.cmdFit.setText('Stop fit') 
    335348        self.parent.communicate.statusBarUpdateSignal.emit('Fitting started...') 
    336         self.cmdFit.setEnabled(False) 
     349        self.is_running = True 
    337350 
    338351    def onHelp(self): 
     
    457470        self.cmdFit.setStyleSheet('QPushButton {color: black;}') 
    458471        self.cmdFit.setText("Fit") 
    459         self.cmdFit.setEnabled(True) 
    460472 
    461473        # Notify the parent about completed fitting 
     
    503515        self.cmdFit.setStyleSheet('QPushButton {color: black;}') 
    504516        self.cmdFit.setText("Fit") 
    505         self.cmdFit.setEnabled(True) 
    506517 
    507518        # Notify the parent about completed fitting 
     
    538549        self.cmdFit.setStyleSheet('QPushButton {color: black;}') 
    539550        self.cmdFit.setText("Fit") 
    540         self.cmdFit.setEnabled(True) 
    541551 
    542552        # Notify the parent about completed fitting 
  • src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py

    rfb39f28 r14e1ff0  
    406406                tab_object.enableInteractiveElements() 
    407407 
    408         pass 
    409  
    410408    def getCurrentStateAsXml(self): 
    411409        """ 
Note: See TracChangeset for help on using the changeset viewer.