Changes in src/sas/sasgui/perspectives/fitting/fitpanel.py [c9ecd1b:6f9abd3] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/fitpanel.py
rc9ecd1b r6f9abd3 92 92 # state must be cloned 93 93 state = page.get_state().clone() 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: 94 if data is not None or page.model is not None: 97 95 new_doc = self._manager.state_reader.write_toXML(data, 98 96 state, 99 97 batch_state) 100 # Fit #2 through #n are append to first fit101 98 if doc is not None and hasattr(doc, "firstChild"): 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 99 child = new_doc.firstChild.firstChild 100 doc.firstChild.appendChild(child) 107 101 else: 108 102 doc = new_doc … … 401 395 temp_data = page.get_data() 402 396 if temp_data is not None and temp_data.id in data: 403 self.close_page_with_data(temp_data) 397 self.SetSelection(pos) 398 self.on_close_page(event=None) 399 temp = self.GetSelection() 400 self.DeletePage(temp) 404 401 if self.sim_page is not None: 405 402 if len(self.sim_page.model_list) == 0: … … 407 404 self.SetSelection(pos) 408 405 self.on_close_page(event=None) 409 self.DeletePage(pos) 406 temp = self.GetSelection() 407 self.DeletePage(temp) 410 408 self.sim_page = None 411 409 self.batch_on = False … … 503 501 if data is None: 504 502 return None 503 focused_page = self.GetPage(self.GetSelection()) 505 504 for page in self.opened_pages.values(): 506 505 # check if the selected data existing in the fitpanel 507 506 pos = self.GetPageIndex(page) 508 507 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't 510 # send data here. 511 continue 509 512 # make sure data get placed in 1D empty tab if data is 1D 510 513 # else data get place on 2D tab empty tab
Note: See TracChangeset
for help on using the changeset viewer.