Changeset 252d959 in sasview


Ignore:
Timestamp:
Sep 14, 2017 8:13:13 AM (7 years ago)
Author:
lewis
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:
79e6a33
Parents:
33dc18f
Message:

Improve S(Q) combobox behaviour when plugins reloaded

File:
1 edited

Legend:

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

    r33dc18f r252d959  
    358358                                page.formfactorbox.SetLabel(current_val) 
    359359                        if hasattr(page, 'structurebox'): 
     360                            selected_name = page.structurebox.GetStringSelection() 
     361 
    360362                            page.structurebox.Clear() 
    361363                            page._populate_box(page.structurebox, 
    362364                                page.model_list_box["Structure Factors"]) 
     365                            page.structurebox.Insert("None", 0, None) 
     366 
     367                            index = page.structurebox.FindString(selected_name) 
     368                            if index == -1: 
     369                                index = 0 
     370                            page.structurebox.SetSelection(index) 
     371                            page._on_select_model() 
    363372        except: 
    364373            logger.error("update_custom_combo: %s", sys.exc_value) 
Note: See TracChangeset for help on using the changeset viewer.