Changeset 982577b in sasview


Ignore:
Timestamp:
Apr 6, 2017 11:56:37 AM (8 months ago)
Author:
krzywon
Branches:
master, ESS_GUI, ESS_GUI_Pr, ESS_GUI_cns, ESS_GUI_corf, ESS_GUI_py2_OLD, SVCC-1, SasView-664, costrafo411, docs, ticket-873, ticket-976, ticket-993, unittest-saveload
Children:
71b25b2
Parents:
2df1bd1
git-author:
Jeff Krzywon <krzywon@…> (04/06/17 11:56:37)
git-committer:
krzywon <krzywon@…> (04/06/17 11:56:37)
Message:

File from the box loaded. Events not triggering in proper order.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/local_perspectives/plotting/parameters_panel_slicer.py

    r54557b5 r982577b  
    164164                         wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15) 
    165165            iy += 1 
     166            # TODO: Get list of loaded data, not plots - plot again 
     167            # TODO: try/catch block to catch wx._core.PyDeadObjectError (pass) 
    166168            # File browser 
    167169            save_to = "Save files to:" 
     
    249251            # parent here is plotter2D 
    250252            event = SlicerParameterEvent(type=self.type, params=params) 
    251             wx.PostEvent(self.parent, event) 
     253            wx.PostEvent(self, event) 
    252254 
    253255    def on_batch_slicer(self, evt=None): 
     
    366368        writer = Reader() 
    367369        main_window = self.parent.parent 
    368         data_list = [] 
     370        data_dic = {} 
    369371        append = evt.append_to_name 
    370372        for key, plot in main_window.plot_panels.iteritems(): 
    371373            if not hasattr(plot, "data2D"): 
    372374                for item in plot.plots: 
    373                     data_list.append(item) 
    374         for item in data_list: 
    375             data1d = item.plots 
    376             base = item.name.split(".")[0] 
    377             save_to = evt.path + base + ".xml" 
    378             writer.write(path, data1d) 
    379  
    380         # TODO: determine data sets 
    381         # TODO: generate file names 
    382         # TODO: link one to the other 
     375                    data_dic[item] = plot.plots[item] 
     376        for item, data1d in data_dic.iteritems(): 
     377            base = item.split(".")[0] 
     378            save_to = evt.path + "\\" + base + append + ".xml" 
     379            writer.write(save_to, data1d) 
    383380        # TODO: save all files 
    384381 
Note: See TracChangeset for help on using the changeset viewer.