Changeset c70eb7c in sasview for guiframe/gui_manager.py
- Timestamp:
- Mar 9, 2011 7:02:50 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:
- 8b6f489
- Parents:
- 99abf5d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/gui_manager.py
r9c169f4 rc70eb7c 431 431 Hide()) 432 432 433 def append_theory(self, data_id, theory, state=None): 434 """ 435 """ 436 data_state = self._data_manager.append_theory(data_id=data_id, 437 theory=theory, 438 state=state) 439 self._data_panel.load_data_list(data_state) 440 441 def update_data(self, prev_data, new_data): 442 """ 443 """ 444 prev_id, data_state = self._data_manager.update_data(prev_data=prev_data, 445 new_data=new_data) 446 self._data_panel.remove_by_id(prev_id) 447 self._data_panel.load_data_list(data_state) 448 449 450 def freeze(self, data_id, theory_id): 451 """ 452 """ 453 data_state_list = self._data_manager.freeze_theory(data_id=data_id, 454 theory_id=theory_id) 455 456 self._data_panel.load_data_list(list=data_state_list) 457 for data_state in data_state_list: 458 theory_list = data_state.get_theory() 459 for new_plot in theory_list: 460 wx.PostEvent(self, NewplotEvent(plot=new_plot, 461 title=new_plot.title)) 462 463 def delete_data(self, data): 464 """ 465 """ 466 self._current_perspective.delete_data(data) 467 468 433 469 def get_context_menu(self, plotpanel=None): 434 470 """ … … 1207 1243 self.__gui_style = self.__gui_style & (~GUIFRAME.MANAGER_ON) 1208 1244 self._data_panel_menu.SetText('Data Explorer ON') 1209 1245 1246 def add_data_helper(self, data_list): 1247 """ 1248 """ 1249 self._data_manager.add_data(data_list) 1250 1210 1251 def add_data(self, data_list): 1211 1252 """ … … 1215 1256 #send a list of available data to plotting plugin 1216 1257 avalaible_data = [] 1258 theory_list = [] 1217 1259 if self._data_manager is not None: 1218 1260 self._data_manager.add_data(data_list) 1219 1261 avalaible_data = self._data_manager.get_all_data() 1220 1221 # set data in the data panel1222 if self._data_panel is not None:1223 data_state = self._data_manager.get_selected_data()1224 self._data_panel.load_data_list(data_state)1225 1262 style = self.__gui_style & GUIFRAME.MANAGER_ON 1226 1263 if style == GUIFRAME.MANAGER_ON: … … 1232 1269 #automatically send that to the current perspective 1233 1270 self.set_data(data_list) 1234 1271 1272 # set data in the data panel 1273 if self._data_panel is not None: 1274 data_state = self._data_manager.get_selected_data() 1275 self._data_panel.load_data_list(data_state) 1276 1235 1277 def get_data_from_panel(self, data_id, plot=False,append=False): 1236 1278 """ … … 1290 1332 title=str(new_plot.title))) 1291 1333 1292 def add_theory(self, data_id, theory): 1293 """ 1294 """ 1295 self._data_manager.append_theory(data_id, theory) 1296 style = self.__gui_style & GUIFRAME.MANAGER_ON 1297 if style == GUIFRAME.MANAGER_ON: 1298 if self._data_panel is not None: 1299 data_state = self._data_manager.get_by_id([data_id]) 1300 self._data_panel.load_data_list(data_state) 1334 1301 1335 1302 1336 def remove_data(self, data_id, theory_id=None, delete_all=True):
Note: See TracChangeset
for help on using the changeset viewer.