Changes in / [b51c8fc:c972e3a] in sasview


Ignore:
Location:
src/sas/qtgui
Files:
2 edited

Legend:

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

    r04ac604 r4bf58293  
    527527        plots = GuiUtils.plotsFromFilename(filename, model) 
    528528        ids = [list(self.active_plots.values())[id].data.id for id in range(len(self.active_plots))] 
    529         ids2 = [list(self.active_plots.keys())[id] for id in range(len(self.active_plots))] 
    530529 
    531530        new_plots = [] 
    532531        for item, plot in plots.items(): 
    533532            plot_id = plot.id 
    534             if plot_id in ids or plot_id in ids2: 
     533            if plot_id in ids: 
    535534                self.active_plots[plot_id].replacePlot(plot_id, plot) 
    536535            else: 
  • src/sas/qtgui/Plotting/Plotter.py

    r04ac604 r685e0e3  
    6464        self.title(title=value.name) 
    6565 
    66     def plot(self, data=None, color=None, marker=None, hide_error=False, transform=True): 
     66    def plot(self, data=None, color=None, marker=None, hide_error=False): 
    6767        """ 
    6868        Add a new plot of self._data to the chart. 
     
    8383 
    8484            # Transform data if required. 
    85             if transform and (self.data.xtransform is not None or self.data.ytransform is not None): 
     85            if self.data.xtransform is not None or self.data.ytransform is not None: 
    8686                _, _, xscale, yscale = GuiUtils.xyTransform(self.data, self.data.xtransform, self.data.ytransform) 
    8787                if xscale != 'log': 
     
    528528            self.xLabel = new_xlabel 
    529529            self.yLabel = new_ylabel 
    530  
    531             self.plot(data=current_plot, transform=False) 
     530            # Directly overwrite the data to avoid label reassignment 
     531            self._data = current_plot 
     532            self.plot() 
    532533 
    533534        pass # debug hook 
Note: See TracChangeset for help on using the changeset viewer.