Changeset 1150083 in sasview for src/sas/sasgui


Ignore:
Timestamp:
Jul 11, 2016 2:36:55 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
607b090
Parents:
1d4b9e5
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/08/16 07:44:46)
git-committer:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 02:36:55)
Message:

Reset panel correctly when new data is loaded

Location:
src/sas/sasgui/perspectives/corfunc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/corfunc/corfunc.py

    rdc72638 r1150083  
    153153                     NewPlotEvent(plot=new_plot, title=new_plot.title, 
    154154                        reset=reset)) 
     155 
     156    def clear_data(self): 
     157        wx.PostEvent(self.parent, 
     158            NewPlotEvent(action='delete', group_id=GROUP_ID_TRANSFORM)) 
     159        wx.PostEvent(self.parent, 
     160            NewPlotEvent(action='clear', group_id=GROUP_ID_IQ_DATA)) 
  • src/sas/sasgui/perspectives/corfunc/corfunc_panel.py

    r1d4b9e5 r1150083  
    133133        self._data = data 
    134134        self._calculator.set_data(data) 
     135        # Reset the outputs 
     136        for key in OUTPUT_STRINGS.keys(): 
     137            self._output_boxes[key].SetValue("-") 
    135138        if self._manager is not None: 
    136139            from sas.sasgui.perspectives.corfunc.corfunc import IQ_DATA_LABEL 
     140            self._manager.clear_data() 
    137141            self._manager.show_data(self._data, IQ_DATA_LABEL, reset=True) 
     142 
    138143        if set_qrange: 
    139144            lower = data.x[-1]*0.05 
     
    218223            value = params[key] 
    219224            self._output_boxes[key].SetValue(value) 
    220  
    221  
    222225 
    223226    def save_project(self, doc=None): 
     
    254257        self._background_input.SetValue(str(bg)) 
    255258        self._calculator.background = bg 
     259 
    256260 
    257261    def _compute_background(self, event=None): 
Note: See TracChangeset for help on using the changeset viewer.