Changeset e75b5fa in sasview
- Timestamp:
- Feb 23, 2011 2:36:11 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:
- 2ac5f09
- Parents:
- fdb5c19
- Location:
- guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/gui_manager.py
r0348245 re75b5fa 104 104 self._data_menu = None 105 105 self._window_menu = None 106 self._ window_menu = None106 self._data_panel_menu = None 107 107 self._help_menu = None 108 108 self._tool_menu = None … … 381 381 Left(). 382 382 MinimizeButton(). 383 CloseButton(False). 383 384 TopDockable(False). 384 385 BottomDockable(False). … … 634 635 635 636 style = self.__gui_style & GUIFRAME.MANAGER_ON 637 id = wx.NewId() 638 self._data_panel_menu = self._window_menu.Append(id, 639 '&Data Explorer ON', '') 640 wx.EVT_MENU(self, id, self.show_data_panel) 636 641 if style == GUIFRAME.MANAGER_ON: 637 id = wx.NewId()638 self._window_menu.Append(id,'&Data Manager', '')639 wx.EVT_MENU(self, id, self.show_data_panel)642 self._data_panel_menu.SetText('Data Explorer OFF') 643 else: 644 self._data_panel_menu.SetText('Data Explorer ON') 640 645 641 646 style = self.__gui_style & GUIFRAME.PLOTTING_ON … … 1174 1179 show the data panel 1175 1180 """ 1176 style = self.__gui_style & GUIFRAME.MANAGER_ON1177 if style == GUIFRAME.MANAGER_ON:1181 label = self._data_panel_menu.GetText() 1182 if label == 'Data Explorer ON': 1178 1183 pane = self._mgr.GetPane(self.panels["data_panel"].window_name) 1179 1184 #if not pane.IsShown(): 1180 1185 pane.Show(True) 1181 1186 self._mgr.Update() 1187 self.__gui_style = self.__gui_style | GUIFRAME.MANAGER_ON 1188 1189 self._data_panel_menu.SetText('Data Explorer OFF') 1190 else: 1191 pane = self._mgr.GetPane(self.panels["data_panel"].window_name) 1192 #if not pane.IsShown(): 1193 pane.Show(False) 1194 self._mgr.Update() 1195 #self.__gui_style = self.__gui_style | GUIFRAME.MANAGER_ON 1196 self.__gui_style = self.__gui_style & (~GUIFRAME.MANAGER_ON) 1197 self._data_panel_menu.SetText('Data Explorer ON') 1182 1198 1183 1199 def add_data(self, data_list): … … 1198 1214 self._data_panel.load_data_list(data_state) 1199 1215 self._mgr.GetPane(self._data_panel.window_name).Show(True) 1216 self._mgr.Update() 1200 1217 #wait for button press from the data panel to send data 1201 1218 else: 1202 1219 #automatically send that to the current perspective 1203 style = self.__gui_style & GUIFRAME.SINGLE_APPLICATION 1204 if style == GUIFRAME.SINGLE_APPLICATION: 1205 self.set_data(data_list) 1220 self.set_data(data_list) 1206 1221 1207 1222 def get_data_from_panel(self, data_id, plot=False,append=False): -
guiframe/local_perspectives/data_loader/data_loader.py
r0348245 re75b5fa 57 57 Load data 58 58 """ 59 path = None 59 60 if self._default_save_location == None: 60 61 self._default_save_location = os.getcwd() … … 72 73 if len(file_list) >= 0 and not(file_list[0]is None): 73 74 self._default_save_location = os.path.dirname(file_list[0]) 75 path = self._default_save_location 74 76 dlg.Destroy() 75 77 76 if not file_list or file_list[0] is None:78 if path is None or not file_list or file_list[0] is None: 77 79 return 78 80 self.get_data(file_list) 79 self.parent.show_data_panel(event=None)81 80 82 81 83 def can_load_data(self): … … 90 92 Load entire folder 91 93 """ 94 path = None 92 95 if self._default_save_location == None: 93 96 self._default_save_location = os.getcwd() … … 105 108 file_list = self.get_file_path(path) 106 109 self.get_data(file_list) 107 self.parent.show_data_panel(event=None) 108 109 110 110 111 def load_error(self, error=None): 111 112 """
Note: See TracChangeset
for help on using the changeset viewer.