- Timestamp:
- Feb 11, 2011 6:42:40 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:
- 90a7bbd
- Parents:
- d20771f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/gui_manager.py
r568658b reec8dbb 150 150 self.Bind(EVT_PANEL_ON_FOCUS, self.set_panel_on_focus) 151 151 152 152 153 def set_panel_on_focus(self, event): 153 154 """ … … 949 950 return 950 951 try: 951 if extension == '.svs': 952 for plug in self.plugins: 953 temp = self.loader.load(path) 954 if temp.__class__.__name__ == "list": 955 for item in temp: 956 data = self.create_gui_data(item, path) 957 output.append(data) 958 else: 959 data = self.create_gui_data(temp, path) 960 output.append(data) 961 962 message = "Loading File..." + str(basename) + "\n" 963 self.load_update(output=output, message=message) 964 else: 965 temp = self.loader.load(path, extension) 966 if temp.__class__.__name__ == "list": 967 for item in temp: 968 data = self.create_gui_data(item, path) 969 output.append(data) 970 else: 971 data = self.create_gui_data(temp, path) 972 output.append(data) 973 message = "Loading File..." + str(basename) + "\n" 974 self.load_update(output=output, message=message) 952 #reading a state file 953 for plug in self.plugins: 954 reader, ext = plug.get_extensions() 955 if reader is not None: 956 #read the state of the single plugin 957 if extension == ext: 958 reader.read(path) 959 return 960 elif extension == '.svs': 961 reader.read(path) 975 962 except: 976 963 raise 977 error_message = "Error while loading: %s\n" % str(p_file) 978 error_message += str(sys.exc_value) + "\n" 979 self.load_update(output=output, message=error_message) 980 981 message = "Loading Complete! " 982 self.load_complete(output=output, error_message=error_message, 983 message=message, path=path, extension=extension) 984 964 985 965 def load_update(self, output=None, message=""): 986 966 """ … … 1013 993 #plug.on_set_state_helper(event=None) 1014 994 _, ext = plug.get_extensions() 1015 if extension == ext: 1016 plug.set_state(state=None, datainfo=available_data) 1017 elif extension == '.svs': 1018 plug.set_state(state=None, datainfo=available_data) 995 plug.set_state(state=None, datainfo=available_data) 996 1019 997 1020 998 style = self.__gui_style & GUIFRAME.MANAGER_ON
Note: See TracChangeset
for help on using the changeset viewer.