Changeset 69363c7 in sasview for src/sas/sasgui/perspectives/fitting/fitpanel.py
- Timestamp:
- Sep 22, 2017 10:29:48 AM (7 years ago)
- 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:
- ab0b93f
- Parents:
- 1386b2f (diff), d76c43a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Paul Kienzle <pkienzle@…> (09/22/17 10:28:48)
- git-committer:
- Paul Kienzle <pkienzle@…> (09/22/17 10:29:48)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitpanel.py
r277257f r69363c7 98 98 # state must be cloned 99 99 state = page.get_state().clone() 100 if data is not None or page.model is not None: 100 # data_list only populated with real data 101 # Fake object in data from page.get_data() if model is selected 102 if len(page.data_list) is not 0 and page.model is not None: 101 103 new_doc = self._manager.state_reader.write_toXML(data, 102 104 state, 103 105 batch_state) 106 # Fit #2 through #n are append to first fit 104 107 if doc is not None and hasattr(doc, "firstChild"): 105 child = new_doc.firstChild.firstChild 106 doc.firstChild.appendChild(child) 108 # Only append if properly formed new_doc 109 if new_doc is not None and hasattr(new_doc, "firstChild"): 110 child = new_doc.firstChild.firstChild 111 doc.firstChild.appendChild(child) 112 # First fit defines the main document 107 113 else: 108 114 doc = new_doc … … 396 402 temp_data = page.get_data() 397 403 if temp_data is not None and temp_data.id in data: 398 self.SetSelection(pos) 399 self.on_close_page(event=None) 400 temp = self.GetSelection() 401 self.DeletePage(temp) 404 self.close_page_with_data(temp_data) 402 405 if self.sim_page is not None: 403 406 if len(self.sim_page.model_list) == 0: … … 405 408 self.SetSelection(pos) 406 409 self.on_close_page(event=None) 407 temp = self.GetSelection() 408 self.DeletePage(temp) 410 self.DeletePage(pos) 409 411 self.sim_page = None 410 412 self.batch_on = False … … 500 502 if data is None: 501 503 return None 504 focused_page = self.GetPage(self.GetSelection()) 502 505 for page in self.opened_pages.values(): 503 506 # check if the selected data existing in the fitpanel 504 507 pos = self.GetPageIndex(page) 505 508 if not check_data_validity(page.get_data()) and not page.batch_on: 509 if page.model is not None and page != focused_page: 510 # Page has an active theory and is in background - don't 511 # send data here. 512 continue 506 513 # make sure data get placed in 1D empty tab if data is 1D 507 514 # else data get place on 2D tab empty tab
Note: See TracChangeset
for help on using the changeset viewer.