Ignore:
Timestamp:
Jul 5, 2017 5:28:55 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
1386b2f
Parents:
251ef684
Message:

clean up plugin-model handling code; preserve active parameter values when plugin is updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/fitpanel.py

    r65f3930 r277257f  
    114114        """ 
    115115        temp = self.menu_mng.update() 
    116         if len(temp): 
     116        if temp: 
    117117            self.model_list_box = temp 
    118118        return temp 
     
    121121        """ 
    122122        """ 
    123         temp = self.menu_mng.plugins_reset() 
    124         if len(temp): 
    125             self.model_list_box = temp 
    126         return temp 
     123        self.model_list_box = self.menu_mng.plugins_reset() 
     124        return self.model_list_box 
    127125 
    128126    def get_page_by_id(self, uid): 
     
    298296        self.model_list_box = dict 
    299297 
    300     def set_model_dict(self, m_dict): 
     298    def set_model_dictionary(self, model_dictionary): 
    301299        """ 
    302300        copy a dictionary of model name -> model object 
    303301 
    304         :param m_dict: dictionary linking model name -> model object 
     302        :param model_dictionary: dictionary linking model name -> model object 
    305303        """ 
    306304 
     
    356354        panel._set_save_flag(not panel.batch_on) 
    357355        panel.set_model_dictionary(self.model_dictionary) 
    358         panel.populate_box(model_dict=self.model_list_box) 
     356        panel.populate_box(model_list_box=self.model_list_box) 
    359357        panel.formfactor_combo_init() 
    360358        panel.set_manager(self._manager) 
Note: See TracChangeset for help on using the changeset viewer.