Changes in / [4f790d2:170e95d] in sasview


Ignore:
Files:
58 deleted
2 edited

Legend:

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

    r7d8bebf rfef38e8  
    9090        self.communicator = self.parent.communicator() 
    9191        self.communicator.fileReadSignal.connect(self.loadFromURL) 
    92         self.communicator.activeGraphsSignal.connect(self.updateGraphCount) 
     92        self.communicator.activeGraphsSignal.connect(self.updateGraphCombo) 
    9393        self.communicator.activeGraphName.connect(self.updatePlotName) 
    9494        self.communicator.plotUpdateSignal.connect(self.updatePlot) 
     
    417417        self.cbgraph.setItemText(ind, current_name) 
    418418 
    419     def updateGraphCount(self, graph_list): 
    420         """ 
    421         Modify the graph name combo and potentially remove 
    422         deleted graphs 
    423         """ 
    424         self.updateGraphCombo(graph_list) 
    425  
    426         if not self.active_plots: 
    427             return 
    428         new_plots = [PlotHelper.plotById(plot) for plot in graph_list] 
    429         active_plots_copy = self.active_plots.keys() 
    430         for plot in active_plots_copy: 
    431             if self.active_plots[plot] in new_plots: 
    432                 continue 
    433             self.active_plots.pop(plot) 
    434  
    435419    def updateGraphCombo(self, graph_list): 
    436420        """ 
     
    439423        orig_text = self.cbgraph.currentText() 
    440424        self.cbgraph.clear() 
     425        #graph_titles= [str(graph) for graph in graph_list] 
     426 
     427        #self.cbgraph.insertItems(0, graph_titles) 
    441428        self.cbgraph.insertItems(0, graph_list) 
    442429        ind = self.cbgraph.findText(orig_text) 
     
    467454            plot_id = plot.id 
    468455            if plot_id in self.active_plots.keys(): 
    469                 self.active_plots[plot_id].replacePlot(plot_id, plot) 
     456                self.active_plots[plot_id].replacePlot(plot_id, plot_to_show) 
    470457            else: 
    471458                self.plotData([(None, plot)]) 
     
    499486        # Call show on requested plots 
    500487        # All same-type charts in one plot 
    501         #if isinstance(plot_set, Data1D): 
    502         #    new_plot = Plotter(self) 
     488        new_plot = Plotter(self) 
    503489 
    504490        for item, plot_set in plots: 
    505491            if isinstance(plot_set, Data1D): 
    506                 if not 'new_plot' in locals(): 
    507                     new_plot = Plotter(self) 
    508492                new_plot.plot(plot_set) 
    509493            elif isinstance(plot_set, Data2D): 
     
    513497                raise AttributeError, msg 
    514498 
    515         if 'new_plot' in locals() and \ 
     499        if plots and \ 
    516500            hasattr(new_plot, 'data') and \ 
    517501            isinstance(new_plot.data, Data1D): 
     
    537521        title = str(PlotHelper.idOfPlot(new_plot)) 
    538522        new_plot.setWindowTitle(title) 
    539  
    540         # Set the object name to satisfy the Squish object picker 
    541         new_plot.setObjectName(title) 
    542523 
    543524        # Add the plot to the workspace 
  • src/sas/qtgui/Plotting/PlotterBase.py

    r7d8bebf rdc5ef15  
    128128        """ title setter """ 
    129129        self._title = title 
    130         # Set the object name to satisfy the Squish object picker 
    131         self.canvas.setObjectName(title) 
    132130 
    133131    @property 
     
    273271        # Please remove me from your database. 
    274272        PlotHelper.deletePlot(PlotHelper.idOfPlot(self)) 
    275  
    276273        # Notify the listeners 
    277274        self.manager.communicator.activeGraphsSignal.emit(PlotHelper.currentPlots()) 
    278  
    279275        event.accept() 
    280276 
Note: See TracChangeset for help on using the changeset viewer.