Changeset f7d0b74 in sasview
- Timestamp:
- Apr 22, 2011 11:36:50 AM (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:
- 29d6fa5
- Parents:
- 6ce7201
- Location:
- guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/data_panel.py
r2a62d5c rf7d0b74 110 110 self.do_layout() 111 111 self.Bind(wx.EVT_SHOW, self.on_close_page) 112 self.enable_remove() 113 self.enable_import() 112 114 113 115 114 def do_layout(self): … … 331 330 self.sizer3.Add(self.bt_freeze,( iy, ix),(1,1), 332 331 wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 5) 332 self.enable_remove() 333 self.enable_import() 334 self.enable_plot() 335 self.enable_append() 336 self.enable_freeze() 333 337 334 338 def layout_batch(self): … … 418 422 if not list: 419 423 self.enable_remove() 424 self.enable_import() 425 self.enable_plot() 426 self.enable_freeze() 420 427 return 421 428 # uncheck previous items … … 472 479 self.append_theory(state_id, theory_list) 473 480 self.enable_remove() 481 self.enable_import() 482 self.enable_plot() 483 self.enable_freeze() 474 484 475 485 def _uncheck_all(self): … … 773 783 theory_id=theory_to_remove) 774 784 self.enable_remove() 785 self.enable_freeze() 775 786 776 787 def on_import(self, event=None): … … 839 850 self.cb_plotpanel.Append(name_plot_panel, value) 840 851 self.cb_plotpanel.SetStringSelection(name_plot_panel) 841 852 self.enable_append() 842 853 843 854 def _on_plot_selection(self, event = None): … … 862 873 n_t = self.tree_ctrl.GetCount() 863 874 n_t_t = self.tree_ctrl_theory.GetCount() 864 865 875 if n_t + n_t_t <= 0: 866 876 self.bt_remove.Disable() … … 876 886 else: 877 887 self.bt_import.Enable() 878 879 888 889 def enable_plot(self): 890 """ 891 enable or disable plot button 892 """ 893 n_t = self.tree_ctrl.GetCount() 894 n_t_t = self.tree_ctrl_theory.GetCount() 895 if n_t + n_t_t <= 0: 896 self.bt_plot.Disable() 897 else: 898 self.bt_plot.Enable() 899 900 def enable_append(self): 901 """ 902 enable or disable append button 903 """ 904 if self.cb_plotpanel.GetValue() == 'None': 905 self.bt_append_plot.Disable() 906 else: 907 self.bt_append_plot.Enable() 908 909 def enable_freeze(self): 910 """ 911 enable or disable the freeze button 912 """ 913 n_t_t = self.tree_ctrl_theory.GetCount() 914 n_l = len(self.list_cb_theory) 915 if (n_t_t <= 0) and (n_l <= 0): 916 self.bt_freeze.Disable() 917 else: 918 self.bt_freeze.Enable() 919 920 921 880 922 class DataFrame(wx.Frame): 881 923 ## Internal name for the AUI manager -
guiframe/gui_manager.py
rd38d0042 rf7d0b74 1109 1109 caption = self.panels[ID].window_caption 1110 1110 if ID in self.panels.keys(): 1111 self.panel_on_focus = None 1111 1112 panel = self.panels[ID] 1112 1113 self._plotting_plugin.delete_panel(panel.group_id) 1113 1114 self._mgr.DetachPane(panel) 1114 panel.Destroy() 1115 panel.Hide() 1116 panel.clear() 1117 panel.Close() 1118 self._mgr.Update() 1119 print "here here " 1120 return 1115 1121 if ID in self.panels.keys(): 1116 1122 del self.panels[ID] … … 1121 1127 if ind != wx.NOT_FOUND: 1122 1128 self._data_panel.cb_plotpanel.Delete(ind) 1129 1123 1130 self._mgr.Update() 1131 1124 1132 1125 1133 def clear_panel(self): … … 1169 1177 if style == GUIFRAME.MANAGER_ON: 1170 1178 if self._data_panel is not None: 1171 data_state = self._data_manager.get_selected_data()1172 self._data_panel.load_data_list(data_state)1179 #data_state = self._data_manager.get_selected_data() 1180 #self._data_panel.load_data_list(data_state) 1173 1181 self._mgr.GetPane(self._data_panel.window_name).Show(True) 1174 1182 … … 1295 1303 plug_wlist = PLUGINS_WLIST 1296 1304 1297 return plug_wlist1298 1299 1305 def _on_open_state_project(self, event): 1300 1306 """ … … 1308 1314 self._default_save_location, "", 1309 1315 APPLICATION_WLIST) 1310 print dlg.GetFilterIndex()1311 1316 if dlg.ShowModal() == wx.ID_OK: 1312 1317 path = dlg.GetPath()
Note: See TracChangeset
for help on using the changeset viewer.