Changeset b9ab979 in sasview for src


Ignore:
Timestamp:
Nov 6, 2018 3:17:08 AM (5 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:
1942f63
Parents:
a0ad146
Message:

Automatically show sector/annulus/box plots SASVIEW-980

Location:
src/sas/qtgui
Files:
6 edited

Legend:

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

    r722b7d6 rb9ab979  
    9999        self.communicator.extMaskEditorSignal.connect(self.extShowEditDataMask) 
    100100        self.communicator.changeDataExplorerTabSignal.connect(self.changeTabs) 
     101        self.communicator.forcePlotDisplaySignal.connect(self.displayData) 
    101102 
    102103        self.cbgraph.editTextChanged.connect(self.enableGraphCombo) 
     
    636637            # Try the current item 
    637638            main_data = GuiUtils.dataFromItem(plot_item) 
     639        # 1D dependent plots of 2D sets - special treatment 
     640        if isinstance(main_data, Data2D) and isinstance(plot_to_show, Data1D): 
     641            main_data = None 
    638642 
    639643        # Make sure main data for 2D is always displayed 
    640         if main_data and not self.isPlotShown(main_data): 
     644        if main_data is not None and not self.isPlotShown(main_data): 
    641645            if isinstance(main_data, Data2D): 
    642646                self.plotData([(plot_item, main_data)]) 
     
    656660            # Plots with main data points on the same chart 
    657661            # Get the main data plot 
    658             if main_data and not self.isPlotShown(main_data): 
     662            if main_data is not None and not self.isPlotShown(main_data): 
    659663                new_plots.append((plot_item, main_data)) 
    660664            new_plots.append((plot_item, plot_to_show)) 
  • src/sas/qtgui/Plotting/Plotter2D.py

    ra0ad146 rb9ab979  
    288288        self.manager.communicator.plotUpdateSignal.emit([new_plot]) 
    289289 
     290        self.manager.communicator.forcePlotDisplaySignal.emit([item, new_plot]) 
     291 
     292        # Show the plot 
     293 
    290294    def setSlicer(self, slicer): 
    291295        """ 
  • src/sas/qtgui/Plotting/Slicers/AnnulusSlicer.py

    r63467b6 rb9ab979  
    148148        GuiUtils.updateModelItemWithPlot(item, new_plot, new_plot.id) 
    149149        self.base.manager.communicator.plotUpdateSignal.emit([new_plot]) 
     150        self.base.manager.communicator.forcePlotDisplaySignal.emit([item, new_plot]) 
    150151 
    151152        if self.update_model: 
  • src/sas/qtgui/Plotting/Slicers/BoxSlicer.py

    r63467b6 rb9ab979  
    188188        new_plot.id = (self.averager.__name__) + self.base.data.name 
    189189        new_plot.is_data = True 
     190        item = self._item 
    190191        if self._item.parent() is not None: 
    191192            item = self._item.parent() 
    192193        GuiUtils.updateModelItemWithPlot(item, new_plot, new_plot.id) 
     194        self.base.manager.communicator.forcePlotDisplaySignal.emit([item, new_plot]) 
    193195 
    194196        if self.update_model: 
  • src/sas/qtgui/Plotting/Slicers/SectorSlicer.py

    r63467b6 rb9ab979  
    167167        new_plot.id = "SectorQ" + self.base.data.name 
    168168        new_plot.is_data = True 
     169        item = self._item 
    169170        if self._item.parent() is not None: 
    170171            item = self._item.parent() 
     
    172173 
    173174        self.base.manager.communicator.plotUpdateSignal.emit([new_plot]) 
     175        self.base.manager.communicator.forcePlotDisplaySignal.emit([item, new_plot]) 
    174176 
    175177        if self.update_model: 
  • src/sas/qtgui/Utilities/GuiUtils.py

    raed159f rb9ab979  
    286286    # Plot fitting results (FittingWidget->GuiManager) 
    287287    resultPlotUpdateSignal = QtCore.pyqtSignal(list) 
     288 
     289    # show the plot as a regular in-workspace object 
     290    forcePlotDisplaySignal = QtCore.pyqtSignal(list) 
    288291 
    289292def updateModelItemWithPlot(item, update_data, name=""): 
Note: See TracChangeset for help on using the changeset viewer.