Changeset 1e3394f in sasview
- Timestamp:
- Apr 27, 2011 6:14:41 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:
- 83a75c5
- Parents:
- df8cc63
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/data_panel.py
rdf8cc63 r1e3394f 116 116 self.tree_ctrl_theory = None 117 117 self.perspective_cbox = None 118 self.at_least_on_check = True 118 119 119 120 self.owner = None … … 248 249 if option == 'Select all Data': 249 250 self.tree_ctrl.CheckItem(data_ctrl, True) 251 self.at_least_on_check = True 250 252 elif option == 'Unselect all Data': 251 253 self.tree_ctrl.CheckItem(data_ctrl, False) 254 self.at_least_on_check = False 252 255 elif option == 'Select all Data 1D': 253 256 if data_class == 'Data1D': 254 257 self.tree_ctrl.CheckItem(data_ctrl, True) 258 self.at_least_on_check = True 255 259 elif option == 'Unselect all Data 1D': 256 260 if data_class == 'Data1D': … … 259 263 if data_class == 'Data1D': 260 264 self.tree_ctrl.CheckItem(data_ctrl, True) 265 self.at_least_on_check = True 261 266 elif option == 'Select all Data 2D': 262 267 if data_class == 'Data2D': 263 268 self.tree_ctrl.CheckItem(data_ctrl, True) 269 self.at_least_on_check = True 264 270 elif option == 'Unselect all Data 2D': 265 271 if data_class == 'Data2D': 266 272 self.tree_ctrl.CheckItem(data_ctrl, False) 273 self.enable_append() 274 self.enable_freeze() 275 self.enable_plot() 276 self.enable_import() 277 #self.enable_remove() 267 278 268 279 def on_set_active_perspective(self, event): … … 412 423 item = event.GetItem() 413 424 item.Check(not item.IsChecked()) 425 if item.IsChecked(): 426 self.at_least_on_check = True 427 self.enable_append() 428 self.enable_freeze() 429 self.enable_plot() 430 self.enable_import() 431 #self.enable_remove() 414 432 event.Skip() 415 433 … … 498 516 data_ctrl, _, _, _,_, _ = item 499 517 self.tree_ctrl.CheckItem(data_ctrl, False) 500 518 self.at_least_on_check = False 519 self.enable_append() 520 self.enable_freeze() 521 self.enable_plot() 522 self.enable_import() 523 #self.enable_remove() 501 524 502 525 def append_theory(self, state_id, theory_list): … … 909 932 else: 910 933 self.bt_plot.Enable() 934 if not self.at_least_on_check: 935 self.bt_plot.Disable() 936 else: 937 self.bt_append_plot.Enable() 938 self.bt_plot.Enable() 911 939 912 940 def enable_append(self): … … 916 944 n_t = 0 917 945 n_t_t = 0 946 if not self.at_least_on_check: 947 self.bt_append_plot.Disable() 948 self.cb_plotpanel.Disable() 949 else: 950 self.bt_append_plot.Enable() 951 self.cb_plotpanel.Enable() 918 952 if self.tree_ctrl != None: 919 953 n_t = self.tree_ctrl.GetCount() … … 933 967 self.cb_plotpanel.Enable() 934 968 969 def check_theory_to_freeze(self): 970 """ 971 """ 935 972 def enable_freeze(self): 936 973 """ … … 942 979 n_t_t = self.tree_ctrl_theory.GetCount() 943 980 n_l = len(self.list_cb_theory) 944 if (n_t_t <= 0) and (n_l <= 0): 981 if (n_t_t + n_l > 0) and self.at_least_on_check: 982 self.bt_freeze.Enable() 983 else: 945 984 self.bt_freeze.Disable() 946 else:947 self.bt_freeze.Enable()948 985 949 986 def enable_selection(self):
Note: See TracChangeset
for help on using the changeset viewer.