Changeset e2e5f3d in sasview


Ignore:
Timestamp:
Oct 1, 2018 9:22:15 AM (3 months ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Invariant, ESS_GUI_batch_fitting, ESS_GUI_ordering
Children:
b8745fa
Parents:
0d2629f
git-author:
Piotr Rozyczko <piotr.rozyczko@…> (10/01/18 09:19:42)
git-committer:
Piotr Rozyczko <piotr.rozyczko@…> (10/01/18 09:22:15)
Message:

Fixed freeze on theory curves - SASVIEW-1185

Location:
src/sas/qtgui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/MainWindow/DataExplorer.py

    r63467b6 re2e5f3d  
    536536        self.cbgraph.setCurrentIndex(ind) 
    537537        self.cbgraph.setItemText(ind, current_name) 
     538 
     539    def add_data(self, data_list): 
     540        """ 
     541        Update the data manager with new items 
     542        """ 
     543        self.manager.add_data(data_list) 
    538544 
    539545    def updateGraphCount(self, graph_list): 
     
    12051211        self.model.endResetModel() 
    12061212 
     1213    def freezeDataToItem(self, data=None): 
     1214        """ 
     1215        Freeze given set of data to main model 
     1216        """ 
     1217        if data is None: 
     1218            return 
     1219        self.model.beginResetModel() 
     1220        new_item = GuiUtils.createModelItemWithPlot(data, data.name) 
     1221 
     1222        self.model.appendRow(new_item) 
     1223        self.model.endResetModel() 
     1224 
    12071225    def freezeSelectedItems(self): 
    12081226        """ 
  • src/sas/qtgui/MainWindow/DataManager.py

    ra54bbf2b re2e5f3d  
    150150    def add_data(self, data_list): 
    151151        """ 
    152         receive a list of 
     152        receive a list of data items for storage 
    153153        """ 
    154154        for id, data in data_list.items(): 
  • src/sas/qtgui/Plotting/Plotter.py

    r34f13a83 re2e5f3d  
    467467        """ 
    468468        plot = self.plot_dict[id] 
    469         self.manager.add_data(data_list=[plot]) 
     469        self.manager.add_data(data_list={id:plot}) 
     470        self.manager.freezeDataToItem(plot) 
    470471 
    471472    def onModifyPlot(self, id): 
Note: See TracChangeset for help on using the changeset viewer.