Changeset 1b1bbf9 in sasview for sansview/perspectives/fitting
- Timestamp:
- Apr 6, 2011 8:42:32 AM (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:
- 2ca51f44
- Parents:
- 16865897
- Location:
- sansview/perspectives/fitting
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/basepage.py
re030625 r1b1bbf9 23 23 _QMIN_DEFAULT = 0.0005 24 24 _QMAX_DEFAULT = 0.5 25 _NPTS_DEFAULT = 5025 _NPTS_DEFAULT = 200 26 26 #Control panel width 27 27 if sys.platform.count("darwin")==0: -
sansview/perspectives/fitting/fitpage.py
r59b8c74 r1b1bbf9 2722 2722 self._show_ftol_dialog() 2723 2723 flag = True 2724 elif event.AltDown() or event.ShiftDown(): 2725 flag = False 2724 2726 else: 2725 flag = False2727 return 2726 2728 # make event free 2727 2729 event.Skip() -
sansview/perspectives/fitting/fitpanel.py
r2296316 r1b1bbf9 3 3 import string 4 4 import wx 5 import wx.lib.flatnotebook as fnb 5 #from wx.lib.flatnotebook import FlatNotebook as nb 6 from wx.aui import AuiNotebook as nb 6 7 7 8 from sans.guiframe.panel_base import PanelBase … … 14 15 15 16 16 class FitPanel( fnb.FlatNotebook, PanelBase):17 class FitPanel(nb, PanelBase): 17 18 18 19 """ … … 32 33 """ 33 34 """ 34 fnb.FlatNotebook.__init__(self, parent, -1,35 nb.__init__(self, parent, -1, 35 36 style= wx.aui.AUI_NB_WINDOWLIST_BUTTON| 36 37 wx.aui.AUI_NB_DEFAULT_STYLE| 37 38 wx.CLIP_CHILDREN) 38 39 PanelBase.__init__(self, parent) 39 self.SetWindowStyleFlag(style=fnb.FNB_FANCY_TABS)40 #self.SetWindowStyleFlag(style=nb.FNB_FANCY_TABS) 40 41 self._manager = manager 41 42 self.parent = parent … … 44 45 self.menu_mng = models.ModelManager() 45 46 self.model_list_box = self.menu_mng.get_model_list() 46 #pageClosedEvent = fnb.EVT_FLATNOTEBOOK_PAGE_CLOSING 47 self.Bind(fnb.EVT_FLATNOTEBOOK_PAGE_CLOSING , self.on_close_page) 47 #pageClosedEvent = nb.EVT_FLATNOTEBOOK_PAGE_CLOSING 48 pageClosedEvent = wx.aui.EVT_AUINOTEBOOK_PAGE_CLOSE 49 50 self.Bind(pageClosedEvent, self.on_close_page) 48 51 ## save the title of the last page tab added 49 52 self.fit_page_name = {} … … 58 61 self.Bind(basepage.EVT_NEXT_STATE, self._onRedo) 59 62 self.Bind(wx.aui.EVT_AUINOTEBOOK_PAGE_CHANGED, self.on_page_changing) 60 63 61 64 #add default pages 62 65 self.add_default_pages() … … 375 378 """ 376 379 #remove hint page 377 if selected_page == self.hint_page:378 return380 #if selected_page == self.hint_page: 381 # return 379 382 ## removing sim_page 380 383 if selected_page == self.sim_page : -
sansview/perspectives/fitting/fitting.py
rbb9f322 r1b1bbf9 277 277 wx.PostEvent(self.parent, NewPlotEvent(plot=data, 278 278 title=str(data.title))) 279 279 280 except: 280 281 raise 281 282 #msg = "Fitting Set_data: " + str(sys.exc_value) 282 283 #wx.PostEvent(self.parent, StatusEvent(status=msg, info="error")) 283 284 285 def set_top_panel(self): 286 """ 287 Close default (welcome) panel 288 """ 289 if 'default' in self.parent.panels: 290 self.parent.on_close_welcome_panel() 291 292 284 293 def set_theory(self, theory_list=None): 285 294 """ … … 352 361 wx.PostEvent(self.parent, NewPlotEvent(plot=data, 353 362 title=data.title)) 354 self.add_fit_page(data)355 caption = pa nel.window_name356 self.store_data(page=pa nel.id, data=data, caption=caption)357 self.mypanels.append(pa nel)363 page = self.add_fit_page(data) 364 caption = page.window_name 365 self.store_data(page=page.id, data=data, caption=caption) 366 self.mypanels.append(page) 358 367 359 368 # get ready for the next set_state … … 689 698 wx.PostEvent(self.parent, StatusEvent(status=msg, 690 699 info="warning")) 700 self.set_top_panel() 691 701 except: 692 702 raise … … 726 736 if self.sim_page is not None: 727 737 self.sim_page.draw_page() 738 return page 728 739 729 740 def _onEVT_SLICER_PANEL(self, event): … … 851 862 data = plottable 852 863 self.add_fit_page(data=data) 864 self.set_top_panel() 853 865 854 866 def update_fit(self, result=None, msg=""): -
sansview/perspectives/fitting/ftol_dialog.py
r2296316 r1b1bbf9 11 11 import wx 12 12 import sys 13 from sans.gui comm.events import StatusEvent13 from sans.guiframe.events import StatusEvent 14 14 # default ftol 15 15 F_TOL = 1.49012e-08
Note: See TracChangeset
for help on using the changeset viewer.