Changeset 1a8e2e8e in sasview for src/sas


Ignore:
Timestamp:
Aug 17, 2016 4:45:15 AM (8 years ago)
Author:
lewis
Branches:
master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
66f21cd
Parents:
6bb4edd
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (08/17/16 04:42:40)
git-committer:
Lewis O'Driscoll <lewis.o'driscoll@…> (08/17/16 04:45:15)
Message:

Don't reset graph axis on linear fit (fixes #603)

Also sets the default fit limits of the fit dialog to the zoomed in region
if values haven't previously been entered

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/plottools/PlotPanel.py

    rfa1cbee r1a8e2e8e  
    666666                dlg.setFitRange(self.xminView, self.xmaxView, 
    667667                                self.xmin, self.xmax) 
     668            else: 
     669                xlim = self.subplot.get_xlim() 
     670                ylim = self.subplot.get_ylim() 
     671                dlg.setFitRange(xlim[0], xlim[1], ylim[0], ylim[1]) 
    668672            # It would be nice for this to NOT be modal (i.e. Show). 
    669673            # Not sure about other ramifications - for example 
     
    18941898 
    18951899        """ 
     1900        xlim = self.subplot.get_xlim() 
     1901        ylim = self.subplot.get_ylim() 
     1902 
    18961903        # Saving value to redisplay in Fit Dialog when it is opened again 
    18971904        self.Avalue, self.Bvalue, self.ErrAvalue, \ 
     
    19241931            self.fit_result.name = 'Fit' 
    19251932            self.plots[fit_id] = self.fit_result 
     1933        self.subplot.set_xlim(xlim) 
     1934        self.subplot.set_ylim(ylim) 
    19261935        self.subplot.figure.canvas.draw_idle() 
    19271936 
Note: See TracChangeset for help on using the changeset viewer.