Changeset 27313b7 in sasview for src/sas/qtgui/DataExplorer.py


Ignore:
Timestamp:
Dec 13, 2016 4:28:07 AM (8 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:
63974f0
Parents:
c4e5400
Message:

Added window title GUI for charts

File:
1 edited

Legend:

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

    rb4b8589 r27313b7  
    8080        self.communicator.fileReadSignal.connect(self.loadFromURL) 
    8181        self.communicator.activeGraphsSignal.connect(self.updateGraphCombo) 
     82        self.communicator.activeGraphName.connect(self.updatePlotName) 
    8283        self.cbgraph.editTextChanged.connect(self.enableGraphCombo) 
    8384        self.cbgraph.currentIndexChanged.connect(self.enableGraphCombo) 
     
    368369        return new_item 
    369370 
     371    def updatePlotName(self, name_tuple): 
     372        """ 
     373        Modify the name of the current plot 
     374        """ 
     375        old_name, current_name = name_tuple 
     376        ind = self.cbgraph.findText(old_name) 
     377        self.cbgraph.setCurrentIndex(ind) 
     378        self.cbgraph.setItemText(ind, current_name) 
     379 
    370380    def updateGraphCombo(self, graph_list): 
    371381        """ 
     
    437447        """ 
    438448        Add data set(s) to the existing matplotlib chart 
    439  
    440         TODO: Add 2D-functionality 
    441449        """ 
    442450        # new plot data 
     
    444452 
    445453        # old plot data 
    446         plot_id = self.cbgraph.currentText() 
    447         plot_id = int(plot_id[5:]) 
     454        plot_id = self.cbgraph.currentIndex() + 1 
    448455 
    449456        assert plot_id in PlotHelper.currentPlots(), "No such plot: Graph%s"%str(plot_id) 
Note: See TracChangeset for help on using the changeset viewer.