Changes in src/sas/sasgui/perspectives/fitting/fitpanel.py [6f9abd3:c9ecd1b] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitpanel.py
r6f9abd3 rc9ecd1b 92 92 # state must be cloned 93 93 state = page.get_state().clone() 94 if data is not None or page.model is not None: 94 # data_list only populated with real data 95 # Fake object in data from page.get_data() if model is selected 96 if len(page.data_list) is not 0 and page.model is not None: 95 97 new_doc = self._manager.state_reader.write_toXML(data, 96 98 state, 97 99 batch_state) 100 # Fit #2 through #n are append to first fit 98 101 if doc is not None and hasattr(doc, "firstChild"): 99 child = new_doc.firstChild.firstChild 100 doc.firstChild.appendChild(child) 102 # Only append if properly formed new_doc 103 if new_doc is not None and hasattr(new_doc, "firstChild"): 104 child = new_doc.firstChild.firstChild 105 doc.firstChild.appendChild(child) 106 # First fit defines the main document 101 107 else: 102 108 doc = new_doc … … 395 401 temp_data = page.get_data() 396 402 if temp_data is not None and temp_data.id in data: 397 self.SetSelection(pos) 398 self.on_close_page(event=None) 399 temp = self.GetSelection() 400 self.DeletePage(temp) 403 self.close_page_with_data(temp_data) 401 404 if self.sim_page is not None: 402 405 if len(self.sim_page.model_list) == 0: … … 404 407 self.SetSelection(pos) 405 408 self.on_close_page(event=None) 406 temp = self.GetSelection() 407 self.DeletePage(temp) 409 self.DeletePage(pos) 408 410 self.sim_page = None 409 411 self.batch_on = False … … 501 503 if data is None: 502 504 return None 503 focused_page = self.GetPage(self.GetSelection())504 505 for page in self.opened_pages.values(): 505 506 # check if the selected data existing in the fitpanel 506 507 pos = self.GetPageIndex(page) 507 508 if not check_data_validity(page.get_data()) and not page.batch_on: 508 if page.model is not None and page != focused_page:509 # Page has an active theory and is in background - don't510 # send data here.511 continue512 509 # make sure data get placed in 1D empty tab if data is 1D 513 510 # else data get place on 2D tab empty tab
Note: See TracChangeset
for help on using the changeset viewer.