Changeset 9455d77 in sasview for sansview/sansview.py
- Timestamp:
- Feb 2, 2010 12:17:26 PM (15 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:
- 629e8b9
- Parents:
- c1469ebe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/sansview.py
r6e0e2d85 r9455d77 42 42 #from gui_manager import ViewApp 43 43 self.gui = SansViewApp(0) 44 44 # Set the application manager for the GUI 45 self.gui.set_manager(self) 45 46 # Add perspectives to the basic application 46 47 # Additional perspectives can still be loaded … … 53 54 try: 54 55 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) 57 58 except: 58 59 logging.error("SansView: could not find P(r) plug-in module") … … 76 77 # Fitting perspective 77 78 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 81 82 # Add welcome page 82 83 self.gui.set_welcome_panel(WelcomePanel) … … 85 86 self.gui.build_gui() 86 87 87 # Set the application manager for the GUI88 self.gui.set_manager(self)89 90 88 # Start the main loop 91 89 self.gui.MainLoop() 92 90 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 93 99 94 100 if __name__ == "__main__":
Note: See TracChangeset
for help on using the changeset viewer.