Changeset ebcdb02 in sasview for src/sas


Ignore:
Timestamp:
Nov 8, 2018 5:01:08 AM (6 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:
133812c7
Parents:
be74751
Message:

Analysis only for Fitting, project save on other perspectives saves
datasets. Fixed tab deletion on data removal for batch tabs.

Location:
src/sas/qtgui
Files:
3 edited

Legend:

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

    rbe74751 rebcdb02  
    527527            if new_data.is_data: 
    528528                model = self.model 
     529                # Caption for the theories 
     530                new_item.setChild(2, QtGui.QStandardItem("FIT RESULTS")) 
     531 
    529532            model.appendRow(new_item) 
    530533            self.manager.add_data(data_list={new_data.id:new_data}) 
  • src/sas/qtgui/MainWindow/GuiManager.py

    rbe74751 rebcdb02  
    570570 
    571571        # fit tabs 
    572         params = self.perspective().serializeAllFitpage() 
     572        params={} 
     573        perspective = self.perspective() 
     574        if hasattr(perspective, 'isSerializable') and perspective.isSerializable(): 
     575            params = perspective.serializeAllFitpage() 
    573576 
    574577        # project dictionary structure: 
  • src/sas/qtgui/Perspectives/Fitting/FittingPerspective.py

    rbe74751 rebcdb02  
    11import numpy 
     2import copy 
    23 
    34from PyQt5 import QtCore 
     
    306307        for index_to_delete in index_list: 
    307308            index_to_delete_str = str(index_to_delete) 
    308             if index_to_delete_str in list(self.dataToFitTab.keys()): 
    309                 for tab_name in self.dataToFitTab[index_to_delete_str]: 
    310                     # delete tab #index after corresponding data got removed 
    311                     self.closeTabByName(tab_name) 
    312                 self.dataToFitTab.pop(index_to_delete_str) 
     309            orig_dict = copy.deepcopy(self.dataToFitTab) 
     310            for tab_key in orig_dict.keys(): 
     311                if index_to_delete_str in tab_key: 
     312                    for tab_name in orig_dict[tab_key]: 
     313                        self.closeTabByName(tab_name) 
     314                    self.dataToFitTab.pop(tab_key) 
    313315 
    314316    def allowBatch(self): 
Note: See TracChangeset for help on using the changeset viewer.