Changeset 6450d8c in sasview for sansview


Ignore:
Timestamp:
Jul 27, 2010 4:37:01 PM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
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
Message:

working on guiframe and combobox

Location:
sansview/perspectives/fitting
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/fitpanel.py

    r72a6bf8 r6450d8c  
    44import wx 
    55import wx.aui 
    6  
     6from sans.guicomm.events import NewPlotEvent, StatusEvent   
    77import basepage 
    88 
     
    212212        if state is not None: 
    213213            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) 
    214220            for name, panel, type in self.opened_pages.values(): 
    215221                #Don't return any panel is the exact same page is created 
     
    227233                        self.manager.store_page(page=panel, data=state.data) 
    228234                    panel.reset_page(state=state) 
     235                    wx.PostEvent(self.parent, NewPlotEvent(plot=state.data, title=title)) 
    229236                    page_is_opened = True 
    230237                     
     
    235242                    self.manager.store_page(page=panel, data=state.data) 
    236243                    panel.reset_page(state=state) 
     244                    wx.PostEvent(self.parent, NewPlotEvent(plot=state.data, title=title)) 
    237245                     
    238246    def on_close_page(self, event): 
  • sansview/perspectives/fitting/fitting.py

    r72a6bf8 r6450d8c  
    667667        try: 
    668668            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: 
    672670                if hasattr(data,"title"): 
    673671                    title = str(data.title.lstrip().rstrip()) 
     
    677675                    title = str(data.name) 
    678676                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) 
    679680                wx.PostEvent(self.parent, StatusEvent(status="Page Created", 
    680681                                               info="info")) 
     
    683684                wx.PostEvent(self.parent, StatusEvent(status=msg, info="warning")) 
    684685        except: 
    685             raise 
    686             #msg = "Creating Fit page: %s"%sys.exc_value 
    687             #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")) 
    688689        
    689690    def _onEVT_SLICER_PANEL(self, event): 
  • sansview/perspectives/fitting/hint_fitpage.py

    r72a6bf8 r6450d8c  
    8181        data, path = self.data_cbbox.GetClientData(n) 
    8282        self.parent.manager.add_fit_page(data=data) 
    83         title = os.path.basename(path) 
    84         
    85          
     83       
    8684    def createMemento(self): 
    8785        """ 
Note: See TracChangeset for help on using the changeset viewer.