Changeset 665c083 in sasview
- Timestamp:
- Mar 15, 2011 4:35:15 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:
- 8ee56a9
- Parents:
- df22224
- Location:
- guiframe
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified guiframe/data_manager.py ¶
rdf22224 r665c083 219 219 del self.stored_data[data_id] 220 220 221 self.delete_theory( self,data_id, theory_id)221 self.delete_theory(data_id, theory_id) 222 222 if delete_all: 223 223 self.stored_data = {} … … 227 227 """ 228 228 """ 229 if data_id in self.stored_data: 230 data_state = self.stored_data[data_id] 231 theory_list = data_state.get_theory() 232 if theory_id in theory_list.key(): 233 del theory_list[theory_id] 229 for d_id in data_id: 230 if d_id in self.stored_data: 231 data_state = self.stored_data[d_id] 232 theory_list = data_state.get_theory() 233 if theory_id in theory_list.keys(): 234 del theory_list[theory_id] 234 235 235 236 -
TabularUnified guiframe/data_panel.py ¶
ree2b492 r665c083 497 497 498 498 theory_list_ctrl[theory_id] = [t_child, i_c_c, t_p_c] 499 self.list_cb_theory[data_id] = theory_list_ctrl499 self.list_cb_theory[data_id] = theory_list_ctrl 500 500 501 501 … … 538 538 remove data from application 539 539 """ 540 data_to_remove, theory_to_remove = self.set_data_helper() 541 for item in self.list_cb_data: 542 if item.IsChecked()and \ 543 self.tree_ctrl.GetItemText(item) in data_to_remove: 544 self.tree_ctrl.Delete(item) 545 for item in self.list_cb_theory: 546 if item.IsChecked()and \ 547 self.tree_ctrl.GetItemText(item) in theory_to_remove: 548 self.tree_ctrl.Delete(item) 549 delete_all = False 550 if data_to_remove: 551 delete_all = True 540 data_to_remove, theory_to_remove, _ = self.set_data_helper() 541 data_key = [] 542 theory_key = [] 543 for key, item in self.list_cb_data.iteritems(): 544 data_c, d_i_c, i_c_c, p_c_c, d_p_c, t_c = item 545 if data_c.IsChecked(): 546 self.tree_ctrl.Delete(data_c) 547 data_key.append(key) 548 549 for key, theory_dict in self.list_cb_theory.iteritems(): 550 for value in theory_dict.values(): 551 item, _, _ = value 552 if item.IsChecked(): 553 self.tree_ctrl.Delete(item) 554 theory_key.append(key) 555 for key in data_key: 556 del self.list_cb_data[key] 557 for key in theory_key: 558 del self.list_cb_theory[key] 552 559 self.parent.remove_data(data_id=data_to_remove, 553 theory_id=theory_to_remove, 554 delete_all=delete_all) 560 theory_id=theory_to_remove) 555 561 556 562 def on_import(self, event=None): -
TabularUnified guiframe/gui_manager.py ¶
rdf22224 r665c083 1376 1376 1377 1377 1378 def remove_data(self, data_id, theory_id=None , delete_all=True):1378 def remove_data(self, data_id, theory_id=None): 1379 1379 """ 1380 1380 Delete data state if data_id is provide … … 1384 1384 """ 1385 1385 self._data_manager.delete_data(data_id=data_id, 1386 theory_id=theory_id, 1387 delete_all=delete_all) 1386 theory_id=theory_id) 1388 1387 for plug in self.plugins: 1389 1388 plug.delete_data(data_id)
Note: See TracChangeset
for help on using the changeset viewer.