Changeset 0268aed in sasview for src/sas/qtgui/DataExplorer.py


Ignore:
Timestamp:
Mar 29, 2017 10:02:34 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
7d077d1
Parents:
6fd4e36
Message:

Plotting residuals in fitting.
PlotHelper? updates.
Minor refactoring.

File:
1 edited

Legend:

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

    rcbcdd2c r0268aed  
    5858        self.cmdSendTo.clicked.connect(self.sendData) 
    5959        self.cmdNew.clicked.connect(self.newPlot) 
     60        self.cmdNew_2.clicked.connect(self.newPlot) 
    6061        self.cmdAppend.clicked.connect(self.appendPlot) 
    6162        self.cmdHelp.clicked.connect(self.displayHelp) 
     
    409410        orig_text = self.cbgraph.currentText() 
    410411        self.cbgraph.clear() 
    411         graph_titles= ["Graph"+str(graph) for graph in graph_list] 
    412  
    413         self.cbgraph.insertItems(0, graph_titles) 
     412        #graph_titles= [str(graph) for graph in graph_list] 
     413 
     414        #self.cbgraph.insertItems(0, graph_titles) 
     415        self.cbgraph.insertItems(0, graph_list) 
    414416        ind = self.cbgraph.findText(orig_text) 
    415417        if ind > 0: 
     
    426428        Create a new matplotlib chart from selected data 
    427429        """ 
    428         plots = GuiUtils.plotsFromCheckedItems(self.model) 
     430        # Check which tab is currently active 
     431        if self.current_view == self.treeView: 
     432            plots = GuiUtils.plotsFromCheckedItems(self.model) 
     433        else: 
     434            plots = GuiUtils.plotsFromCheckedItems(self.theory_model) 
    429435 
    430436        # Call show on requested plots 
     
    457463        """ 
    458464        # Update the global plot counter 
    459         title = "Graph"+str(PlotHelper.idOfPlot(new_plot)) 
     465        title = str(PlotHelper.idOfPlot(new_plot)) 
    460466        new_plot.setWindowTitle(title) 
    461467 
     
    477483 
    478484        # old plot data 
    479         plot_id = self.cbgraph.currentIndex() + 1 
    480  
    481         assert plot_id in PlotHelper.currentPlots(), "No such plot: Graph%s"%str(plot_id) 
     485        plot_id = str(self.cbgraph.currentText()) 
     486 
     487        assert plot_id in PlotHelper.currentPlots(), "No such plot: %s"%(plot_id) 
    482488 
    483489        old_plot = PlotHelper.plotById(plot_id) 
Note: See TracChangeset for help on using the changeset viewer.