Changeset 3b95b3b in sasview for src


Ignore:
Timestamp:
Oct 3, 2018 9:11:11 AM (6 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
e258c53
Parents:
34e5170
Message:

Add timestamp to the data frozen from the chart menu. SASVIEW-1185

Location:
src/sas/qtgui
Files:
2 edited

Legend:

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

    r9d7cb19 r3b95b3b  
    512512        try: 
    513513            new_item.child(0).data().is_data = True 
     514            new_item.child(0).data().symbol = 'Circle' 
    514515        except AttributeError: 
    515516            #no data here, pass 
     
    12181219            return 
    12191220        self.model.beginResetModel() 
    1220         new_item = GuiUtils.createModelItemWithPlot(data, data.name) 
     1221        # Append a "unique" descriptor to the name 
     1222        time_bit = str(time.time())[7:-1].replace('.', '') 
     1223        new_name = data.name + '_@' + time_bit 
     1224        # Change the underlying data so it is no longer a theory 
     1225        try: 
     1226            data.is_data = True 
     1227            data.symbol = 'Circle' 
     1228        except AttributeError: 
     1229            #no data here, pass 
     1230            pass 
     1231        new_item = GuiUtils.createModelItemWithPlot(data, new_name) 
    12211232 
    12221233        self.model.appendRow(new_item) 
  • src/sas/qtgui/Plotting/Plotter.py

    re2e5f3d r3b95b3b  
    467467        """ 
    468468        plot = self.plot_dict[id] 
     469        plot = copy.deepcopy(plot) 
    469470        self.manager.add_data(data_list={id:plot}) 
    470471        self.manager.freezeDataToItem(plot) 
Note: See TracChangeset for help on using the changeset viewer.