Ignore:
Timestamp:
Mar 21, 2018 2:17:04 AM (6 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:
8b480d27
Parents:
e4c475b7
git-author:
Piotr Rozyczko <rozyczko@…> (02/08/18 02:19:04)
git-committer:
Piotr Rozyczko <rozyczko@…> (03/21/18 02:17:04)
Message:

Merging feature branches

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py

    r14ec91c5 r3b3b40b  
    88from bumps import fitters 
    99 
     10import sas.qtgui.Utilities.LocalConfig as LocalConfig 
    1011import sas.qtgui.Utilities.ObjectLibrary as ObjectLibrary 
    1112 
     
    116117        tab     = FittingWidget(parent=self.parent, data=data, tab_id=self.maxIndex+1) 
    117118        tab.is_batch_fitting = is_batch 
     119 
    118120        # Add this tab to the object library so it can be retrieved by scripting/jupyter 
    119121        tab_name = self.getTabName(is_batch=is_batch) 
     
    123125            self.updateFitDict(data, tab_name) 
    124126        self.maxIndex += 1 
    125         self.addTab(tab, tab_name) 
     127        icon = QtGui.QIcon() 
     128        if is_batch: 
     129            icon.addPixmap(QtGui.QPixmap("src/sas/qtgui/images/icons/layers.svg")) 
     130        self.addTab(tab, icon, tab_name) 
     131        # Show the new tab 
     132        self.setCurrentIndex(self.maxIndex-1) 
     133        # Notify listeners 
    126134        self.tabsModifiedSignal.emit() 
    127135 
     
    140148        ObjectLibrary.addObject(tab_name, tab) 
    141149        self.tabs.append(tab) 
    142         self.addTab(tab, tab_name) 
     150        icon = QtGui.QIcon() 
     151        icon.addPixmap(QtGui.QPixmap("src/sas/qtgui/images/icons/link.svg")) 
     152        self.addTab(tab, icon, tab_name) 
     153 
     154        # This will be the last tab, so set the index accordingly 
     155        self.setCurrentIndex(self.count()-1) 
    143156 
    144157    def updateFitDict(self, item_key, tab_name): 
Note: See TracChangeset for help on using the changeset viewer.