- Timestamp:
- Sep 28, 2018 2:31:33 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
- Children:
- ba1c145
- Parents:
- 93c505b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitting.py
r93c505b rca30e36b 339 339 Update custom model list in the fitpage combo box 340 340 """ 341 custom_model = 'Plugin Models'342 341 try: 343 342 # Update edit menus … … 347 346 if not new_pmodel_list: 348 347 return 348 349 # Redraws to a page not in focus are showing up as if they are 350 # in the current page tab. 351 current_page_index = self.fit_panel.GetSelection() 352 current_page = self.fit_panel.GetCurrentPage() 353 last_drawn_page = current_page 354 349 355 # Set the new plugin model list for all fit pages; anticipating 350 356 # categories, the updated plugin may be in either the form factor … … 400 406 #print("triggering model update") 401 407 page._on_select_model(keep_pars=True) 408 last_drawn_page = page 409 410 # If last drawn is not the current, then switch the current to the 411 # last drawn then switch back. Very ugly. 412 if last_drawn_page != current_page: 413 for page_index in range(self.fit_panel.PageCount): 414 if self.fit_panel.GetPage(page_index) == last_drawn_page: 415 self.fit_panel.SetSelection(page_index) 416 break 417 self.fit_panel.SetSelection(current_page_index) 418 402 419 except Exception: 403 420 logger.error("update_custom_combo: %s", sys.exc_value)
Note: See TracChangeset
for help on using the changeset viewer.