Changeset 6450d8c in sasview for sansview/perspectives/fitting
- Timestamp:
- Jul 27, 2010 4:37:01 PM (14 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 8898e963
- Parents:
- 330c63b
- Location:
- sansview/perspectives/fitting
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitpanel.py
r72a6bf8 r6450d8c 4 4 import wx 5 5 import wx.aui 6 6 from sans.guicomm.events import NewPlotEvent, StatusEvent 7 7 import basepage 8 8 … … 212 212 if state is not None: 213 213 page_info = self.get_page_info(data=state.data) 214 if hasattr(state.data,"title"): 215 title = str(state.data.title.lstrip().rstrip()) 216 if title == "": 217 title = str(state.data.name) 218 else: 219 title = str(state.data.name) 214 220 for name, panel, type in self.opened_pages.values(): 215 221 #Don't return any panel is the exact same page is created … … 227 233 self.manager.store_page(page=panel, data=state.data) 228 234 panel.reset_page(state=state) 235 wx.PostEvent(self.parent, NewPlotEvent(plot=state.data, title=title)) 229 236 page_is_opened = True 230 237 … … 235 242 self.manager.store_page(page=panel, data=state.data) 236 243 panel.reset_page(state=state) 244 wx.PostEvent(self.parent, NewPlotEvent(plot=state.data, title=title)) 237 245 238 246 def on_close_page(self, event): -
sansview/perspectives/fitting/fitting.py
r72a6bf8 r6450d8c 667 667 try: 668 668 page = self.fit_panel.add_fit_page(data) 669 # add data associated to the page created 670 if page != None: 671 self.store_page(page=page, data=data) 669 if data !=None: 672 670 if hasattr(data,"title"): 673 671 title = str(data.title.lstrip().rstrip()) … … 677 675 title = str(data.name) 678 676 wx.PostEvent(self.parent, NewPlotEvent(plot=data, title=title)) 677 # add data associated to the page created 678 if page != None: 679 self.store_page(page=page, data=data) 679 680 wx.PostEvent(self.parent, StatusEvent(status="Page Created", 680 681 info="info")) … … 683 684 wx.PostEvent(self.parent, StatusEvent(status=msg, info="warning")) 684 685 except: 685 raise686 #msg = "Creating Fit page: %s"%sys.exc_value687 #wx.PostEvent(self.parent, StatusEvent(status=msg, info="error"))686 687 msg = "Creating Fit page: %s"%sys.exc_value 688 wx.PostEvent(self.parent, StatusEvent(status=msg, info="error")) 688 689 689 690 def _onEVT_SLICER_PANEL(self, event): -
sansview/perspectives/fitting/hint_fitpage.py
r72a6bf8 r6450d8c 81 81 data, path = self.data_cbbox.GetClientData(n) 82 82 self.parent.manager.add_fit_page(data=data) 83 title = os.path.basename(path) 84 85 83 86 84 def createMemento(self): 87 85 """
Note: See TracChangeset
for help on using the changeset viewer.