Ignore:
Timestamp:
Sep 11, 2018 2:50:23 AM (6 years ago)
Author:
GitHub <noreply@…>
Parents:
343d7fd (diff), 8e674ccf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Ingo Breßler <dev@…> (09/11/18 02:50:23)
git-committer:
GitHub <noreply@…> (09/11/18 02:50:23)
Message:

Merge 8e674ccf5c2f4e357295344dc59f2796cd7de805 into 343d7fd60f1eda3abfbbd120c048168e649876be

File:
1 edited

Legend:

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

    r2b8286c r8e674ccf  
    9595        self.communicator.activeGraphsSignal.connect(self.updateGraphCount) 
    9696        self.communicator.activeGraphName.connect(self.updatePlotName) 
    97         self.communicator.plotUpdateSignal.connect(self.updatePlot) 
     97        self.communicator.plotUpdateSignal.connect(self.displayData) 
    9898        self.communicator.maskEditorSignal.connect(self.showEditDataMask) 
    9999        self.communicator.extMaskEditorSignal.connect(self.extShowEditDataMask) 
     
    572572        # Each fitpage contains the name based on fit widget number 
    573573        fitpage_name = "" if id is None else "M"+str(id) 
    574         new_plots = [] 
     574        # groups plots which move into an own window 
     575        new_plots = dict(int = [], res = [], pd = []) 
    575576        for item, plot in plots.items(): 
    576             if self.updatePlot(plot) and filename != plot.name: 
     577            if (self.updatePlot(plot) and filename != plot.name) or plot.hidden: 
    577578                continue 
    578579            # Don't plot intermediate results, e.g. P(Q), S(Q) 
    579580            match = GuiUtils.theory_plot_ID_pattern.match(plot.id) 
    580             # 2nd match group contains the identifier for the intermediate result, if present (e.g. "[P(Q)]") 
     581            # 2nd match group contains the identifier for the intermediate 
     582            # result, if present (e.g. "[P(Q)]") 
    581583            if match and match.groups()[1] != None: 
    582584                continue 
    583             # Don't include plots from different fitpages, but always include the original data 
     585            # Don't include plots from different fitpages, 
     586            # but always include the original data 
    584587            if fitpage_name in plot.name or filename == plot.name: 
    585588                # 'sophisticated' test to generate standalone plot for residuals 
     589                # this should be done by some kind of grouping by lists 
     590                # which helps to indicate which go into a single plot window 
    586591                if 'esiduals' in plot.title: 
    587                     plot.yscale='linear' 
    588                     self.plotData([(item, plot)]) 
     592                    plot.yscale = 'linear' 
     593                    new_plots['res'].append((item, plot)) 
     594                elif 'olydispersity' in plot.title: 
     595                    plot.yscale = 'linear' 
     596                    new_plots['pd'].append((item, plot)) 
    589597                else: 
    590                     new_plots.append((item, plot)) 
    591  
    592         if new_plots: 
    593             self.plotData(new_plots) 
     598                    new_plots['int'].append((item, plot)) 
     599 
     600        # create entirely new plots for those which could not be updated 
     601        for plots in new_plots.values(): 
     602            if len(plots): 
     603                self.plotData(plots) 
    594604 
    595605    def displayData(self, data_list, id=None): 
     
    597607        Forces display of charts for the given data set 
    598608        """ 
    599         plot_to_show = data_list[0] 
    600         # passed plot is used ONLY to figure out its title, 
    601         # so all the charts related by it can be pulled from  
    602         # the data explorer indices. 
    603         filename = plot_to_show.filename 
    604         self.displayFile(filename=filename, is_data=plot_to_show.is_data, id=id) 
     609        for plot_to_show in data_list: 
     610            # may there be duplicates? list(OrderedDict.fromkeys(data_list)) 
     611            # passed plot is used ONLY to figure out its title, 
     612            # so all the charts related by it can be pulled from 
     613            # the data explorer indices. 
     614            filename = plot_to_show.filename 
     615            self.displayFile(filename=filename, is_data=plot_to_show.is_data, id=id) 
    605616 
    606617    def addDataPlot2D(self, plot_set, item): 
Note: See TracChangeset for help on using the changeset viewer.