Changeset 9455d77 in sasview for sansview/sansview.py


Ignore:
Timestamp:
Feb 2, 2010 12:17:26 PM (15 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:
629e8b9
Parents:
c1469ebe
Message:

working on the close welcome page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/sansview.py

    r6e0e2d85 r9455d77  
    4242        #from gui_manager import ViewApp 
    4343        self.gui = SansViewApp(0)  
    44          
     44        # Set the application manager for the GUI 
     45        self.gui.set_manager(self) 
    4546        # Add perspectives to the basic application 
    4647        # Additional perspectives can still be loaded 
     
    5354        try: 
    5455            import sans.perspectives.pr as module     
    55             fitting_plug = module.Plugin(standalone=False) 
    56             self.gui.add_perspective(fitting_plug) 
     56            self.fitting_plug = module.Plugin(standalone=False) 
     57            self.gui.add_perspective(self.fitting_plug) 
    5758        except: 
    5859            logging.error("SansView: could not find P(r) plug-in module")  
     
    7677        # Fitting perspective 
    7778        import perspectives.fitting as module     
    78         fitting_plug = module.Plugin() 
    79         self.gui.add_perspective(fitting_plug) 
    80        
     79        self.fitting_plug = module.Plugin() 
     80        self.gui.add_perspective(self.fitting_plug) 
     81         
    8182        # Add welcome page 
    8283        self.gui.set_welcome_panel(WelcomePanel) 
     
    8586        self.gui.build_gui() 
    8687         
    87         # Set the application manager for the GUI 
    88         self.gui.set_manager(self) 
    89          
    9088        # Start the main loop 
    9189        self.gui.MainLoop()   
    9290         
     91    def on_close_welcome_panel(self): 
     92        """ 
     93            When closing the welcome panel, set to the default perspective 
     94        """ 
     95        default_perspective = self.fitting_plug.get_perspective() 
     96        return 
     97        self.fitting_plug.on_perspective(event=None) 
     98     
    9399 
    94100if __name__ == "__main__":  
Note: See TracChangeset for help on using the changeset viewer.