Changeset d4d4c8a in sasview for sansguiframe
- Timestamp:
- Jul 12, 2012 2:19:08 PM (12 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:
- 4cc25e9
- Parents:
- 5e5704d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/data_panel.py
r5e5704d rd4d4c8a 100 100 """ 101 101 # Get the item data 102 data 1 = self.GetItemText(item1)103 data 2 = self.GetItemText(item2)102 data_1 = self.GetItemText(item1) 103 data_2 = self.GetItemText(item2) 104 104 # Compare the item data 105 if data 1 < data2:105 if data_1 < data_2: 106 106 return -1 107 elif data 1 > data2:107 elif data_1 > data_2: 108 108 return 1 109 109 else: … … 239 239 wx.EVT_COMBOBOX(self.selection_cbox, -1, self._on_selection_type) 240 240 self.sizer5.AddMany([(select_txt, 0, wx.ALL,5), 241 (self.selection_cbox, 0, wx.ALL,5)])241 (self.selection_cbox, 0, wx.ALL,5)]) 242 242 self.enable_selection() 243 243 … … 403 403 """ 404 404 data = None 405 selection = event.GetSelection()405 #selection = event.GetSelection() 406 406 id, _, _ = self.FindFocus().GetSelection().GetData() 407 407 data_list, theory_list = \ … … 467 467 """ 468 468 data = self._get_data_selection(event) 469 path = None469 #path = None 470 470 default_name = data.name 471 471 if default_name.count('.') > 0: … … 541 541 id, data_class_name, _ = \ 542 542 self.tree_ctrl_theory.GetSelection().GetData() 543 data_list, _ = \ 544 self.parent.get_data_manager().get_by_id(id_list=[id]) 543 _, _ = self.parent.get_data_manager().get_by_id(id_list=[id]) 545 544 except: 546 545 return … … 667 666 data_ctrl_list = self.list_cb_data[state_id] 668 667 #This state is already display replace it contains 669 data_c, d_i_c, d_t_c, r_n_c, i_c_c, p_c_c, d_p_c, t_c\668 data_c, d_i_c, d_t_c, r_n_c, i_c_c, p_c_c, d_p_c, _ \ 670 669 = data_ctrl_list 671 670 self.tree_ctrl.SetItemText(data_c, data_name) … … 774 773 theory_list_ctrl = {} 775 774 for theory_id, item in theory_list.iteritems(): 776 theory_data, theory_state= item775 theory_data, _ = item 777 776 if theory_data is not None: 778 777 name = theory_data.name … … 897 896 #remove theory references independently of data 898 897 for key in theory_key: 899 for t_key, theory_dict in self.list_cb_theory.iteritems():898 for _, theory_dict in self.list_cb_theory.iteritems(): 900 899 if key in theory_dict: 901 900 for key, value in theory_dict.iteritems(): … … 1119 1118 def check_theory_to_freeze(self): 1120 1119 """ 1120 Check_theory_to_freeze 1121 1121 """ 1122 1122 def enable_freeze(self): … … 1288 1288 1289 1289 1290 from sans.guiframe.dataFitting import Data1D 1291 from sans.guiframe.dataFitting import Data2D, Theory1D 1290 from sans.guiframe.dataFitting import Theory1D 1292 1291 from sans.guiframe.data_state import DataState 1293 1292 … … 1332 1331 path = "path1" 1333 1332 state1 = State() 1334 data_list1['1'] = set_data_state(data1, path, theory, state1)1333 data_list1['1'] = set_data_state(data1, path, theory, state1) 1335 1334 #state 2 1336 1335 data1 = Data2D() … … 1343 1342 #state3 1344 1343 state1 = State() 1345 data_list1['2'] = set_data_state(data1, path, theory, state1)1344 data_list1['2'] = set_data_state(data1, path, theory, state1) 1346 1345 data1 = Data1D() 1347 1346 data1.id = 3 … … 1357 1356 process1 = data1.process[len(data1.process)-1] 1358 1357 process1.data = "07/22/2010" 1359 data_list1['4'] = set_data_state(data1, path, theory, state1)1358 data_list1['4'] = set_data_state(data1, path, theory, state1) 1360 1359 #state 4 1361 1360 temp_data_list = {} 1362 1361 data1.name = "data5 erasing data2" 1363 temp_data_list['4'] = set_data_state(data1, path, theory, state1)1362 temp_data_list['4'] = set_data_state(data1, path, theory, state1) 1364 1363 #state 5 1365 1364 data1 = Data2D() … … 1367 1366 data1.id = 5 1368 1367 data1.append_empty_process() 1369 process1 = data .process[len(data1.process)-1]1368 process1 = data1.process[len(data1.process)-1] 1370 1369 process1.data = "07/01/2010" 1371 1370 theory = Theory1D() … … 1373 1372 path = "path2" 1374 1373 state1 = State() 1375 dstate = set_data_state(data, path,theory, state1)1374 dstate1= set_data_state(data1, path, theory, state1) 1376 1375 theory = Theory1D() 1377 1376 theory.id = 6 1378 1377 theory.name = "CoreShell" 1379 dstate .set_theory(theory)1378 dstate1.set_theory(theory) 1380 1379 theory = Theory1D() 1381 1380 theory.id = 6 1382 1381 theory.name = "CoreShell replacing coreshell in data3" 1383 dstate .set_theory(theory)1384 data_list1['3'] = dstate 1382 dstate1.set_theory(theory) 1383 data_list1['3'] = dstate1 1385 1384 #state 6 1386 1385 data_list1['6'] = set_data_state(None, path, theory, state1)
Note: See TracChangeset
for help on using the changeset viewer.