Changes in / [60a4e71:343d7fd] in sasview


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

Legend:

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

    r8e674ccf r2b8286c  
    9595        self.communicator.activeGraphsSignal.connect(self.updateGraphCount) 
    9696        self.communicator.activeGraphName.connect(self.updatePlotName) 
    97         self.communicator.plotUpdateSignal.connect(self.displayData) 
     97        self.communicator.plotUpdateSignal.connect(self.updatePlot) 
    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         # groups plots which move into an own window 
    575         new_plots = dict(int = [], res = [], pd = []) 
     574        new_plots = [] 
    576575        for item, plot in plots.items(): 
    577             if (self.updatePlot(plot) and filename != plot.name) or plot.hidden: 
     576            if self.updatePlot(plot) and filename != plot.name: 
    578577                continue 
    579578            # Don't plot intermediate results, e.g. P(Q), S(Q) 
    580579            match = GuiUtils.theory_plot_ID_pattern.match(plot.id) 
    581             # 2nd match group contains the identifier for the intermediate 
    582             # result, if present (e.g. "[P(Q)]") 
     580            # 2nd match group contains the identifier for the intermediate result, if present (e.g. "[P(Q)]") 
    583581            if match and match.groups()[1] != None: 
    584582                continue 
    585             # Don't include plots from different fitpages, 
    586             # but always include the original data 
     583            # Don't include plots from different fitpages, but always include the original data 
    587584            if fitpage_name in plot.name or filename == plot.name: 
    588585                # '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 
    591586                if 'esiduals' in plot.title: 
    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)) 
     587                    plot.yscale='linear' 
     588                    self.plotData([(item, plot)]) 
    597589                else: 
    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) 
     590                    new_plots.append((item, plot)) 
     591 
     592        if new_plots: 
     593            self.plotData(new_plots) 
    604594 
    605595    def displayData(self, data_list, id=None): 
     
    607597        Forces display of charts for the given data set 
    608598        """ 
    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) 
     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) 
    616605 
    617606    def addDataPlot2D(self, plot_set, item): 
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    rf3cc979 rf3cc979  
    10881088            return True 
    10891089 
    1090     def updateDataVisibility(self, updateOnly): 
    1091         self.dataUpdateOnly = updateOnly 
    1092         for dataitem in self.all_data: 
    1093             data = GuiUtils.dataFromItem(dataitem) 
    1094             data.hidden = self.dataUpdateOnly 
    1095             self.updateModelIndex(data) 
    1096  
    10971090    def updateData(self): 
    10981091        """ 
     
    11001093        """ 
    11011094        # Update the chart 
    1102         self.updateDataVisibility(True) 
    11031095        if self.data_is_loaded: 
    11041096            self.cmdPlot.setText("Show Plot") 
     
    18231815        self.cmdPlot.setText("Show Plot") 
    18241816        # Force data recalculation so existing charts are updated 
    1825 #        self.showPlot() 
     1817        self.showPlot() 
    18261818        # This is an important processEvent. 
    18271819        # This allows charts to be properly updated in order 
    18281820        # of plots being applied. 
    1829 #        QtWidgets.QApplication.processEvents() 
     1821        QtWidgets.QApplication.processEvents() 
    18301822        self.recalculatePlotData() 
    18311823 
     
    22802272        Create a model or theory index with passed Data1D/Data2D 
    22812273        """ 
    2282         # set some flag which decides if new plots should be created or 
    2283         # just existing ones updated, selectively hiding indiv. plot will also work 
    2284         fitted_data.hidden = getattr(self, 'dataUpdateOnly', True) 
    22852274        if self.data_is_loaded: 
    22862275            if not fitted_data.name: 
     
    24532442        for plot in new_plots: 
    24542443            self.communicate.plotUpdateSignal.emit([plot]) 
    2455         # enable plots to be shown next time if updateData() wasn't called 
    2456         self.updateDataVisibility(False) 
    24572444 
    24582445    def complete2D(self, return_data): 
Note: See TracChangeset for help on using the changeset viewer.