Changeset 105ef92 in sasview


Ignore:
Timestamp:
Mar 20, 2016 6:28:59 AM (9 years ago)
Author:
gonzalezm
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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
5a2695a
Parents:
ab3ed7e
Message:

Added option to Fitting/Edit? Custom Model menu to update the menu of Costamized Models from the content of the plugin_models folder

File:
1 edited

Legend:

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

    raac161f1 r105ef92  
    299299        self.new_model_frame.Show(True) 
    300300 
     301    def load_plugin_models(self, event): 
     302        """ 
     303        Update of models in plugin_models folder 
     304        """ 
     305        event_id = event.GetId() 
     306        self.update_custom_combo()         
     307 
    301308    def update_custom_combo(self): 
    302309        """ 
     
    338345                                   'Add a new model function') 
    339346        wx.EVT_MENU(owner, wx_id, self.make_new_model) 
     347         
    340348        wx_id = wx.NewId() 
    341349        self.edit_model_menu.Append(wx_id, 'Sum|Multi(p1, p2)', 
    342350                                    'Sum of two model functions') 
    343351        wx.EVT_MENU(owner, wx_id, self.make_sum_model) 
     352 
    344353        e_id = wx.NewId() 
    345354        self.edit_menu = wx.Menu() 
     
    353362                                        'Delete', self.delete_menu) 
    354363        self.set_edit_menu_helper(owner, self.delete_custom_model) 
     364 
     365        wx_id = wx.NewId() 
     366        self.edit_model_menu.Append(wx_id, 'Load Models', 
     367          '(Re)Load all models present in user plugin_models folder') 
     368        wx.EVT_MENU(owner, wx_id, self.load_plugin_models) 
    355369 
    356370    def set_edit_menu_helper(self, owner=None, menu=None): 
Note: See TracChangeset for help on using the changeset viewer.