Changeset cef847c in sasview
- Timestamp:
- Jul 26, 2010 5:50:45 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:
- b281210
- Parents:
- 72a6bf8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
invariantview/perspectives/invariant/invariant_panel.py
r343fdb6 rcef847c 82 82 self.new_state = False 83 83 self.is_power_out = False 84 84 85 85 #container of invariant value 86 86 self.inv_container = None … … 96 96 ## Default file location for save 97 97 self._default_save_location = os.getcwd() 98 98 99 99 def err_check_on_data(self): 100 100 """ … … 216 216 217 217 num = self.state.saved_state['state_num'] 218 self.get_state_by_num(state_num=num)219 218 220 219 if num > 0 : … … 223 222 self._redo_enable() 224 223 225 226 224 # get bookmarks 227 225 self.bookmark_num = len(self.state.bookmark_list) 226 228 227 total_bookmark_num = self.bookmark_num+1 229 228 for ind in range(1,total_bookmark_num): … … 234 233 id = wx.NewId() 235 234 self.popUpMenu.Append(id,name,str('')) 236 235 wx.EVT_MENU(self, id, self._back_to_bookmark) 237 236 238 237 self.get_state_by_num(state_num=str(num)) 239 238 240 239 self._get_input_list() 241 242 240 243 241 self.new_state = False … … 507 505 msg= "\n\nStarting a new invariant computation..." 508 506 wx.PostEvent(self.parent, StatusEvent(status=msg)) 507 509 508 510 509 if self._data is None or self.err_check_on_data(): … … 593 592 self.is_power_out = False 594 593 wx.PostEvent(self.parent, StatusEvent(status = msg )) 595 594 596 595 #enable the button_ok for more details 597 596 self.button_details.Enable() … … 600 599 self.button_report.Enable(True) 601 600 wx.PostEvent(self.parent, StatusEvent(status = '\nFinished invariant computation...')) 602 601 603 602 def undo(self,event=None): 604 603 """ … … 670 669 671 670 backup_state_list = copy.deepcopy(self.state.state_list) 672 671 673 672 # get the previous state 674 673 try: … … 678 677 except : 679 678 raise ValueError, "No such state exists in history" 680 679 681 680 # get the state at pre_compute_num 682 681 comp_state = copy.deepcopy(self.state.state_list[current_compute_num]) … … 691 690 except: 692 691 pass 693 692 694 693 self.compute_invariant(event=None) 695 694 # set the input params at the state at pre_state_num … … 715 714 self.state.saved_state = current_state 716 715 self.state.state_num = state_num 717 716 717 718 718 719 719 def get_bookmark_by_num(self, num=None): … … 755 755 pass 756 756 self.state.saved_state = copy.deepcopy(current_state) 757 757 758 758 self._enable_high_q_section(event=None) 759 759 self._enable_low_q_section(event=None) … … 875 875 self._redo_disable() 876 876 877 877 878 def _reset_state_list(self,data=None): 878 879 """ … … 1142 1143 else: 1143 1144 return False 1145 1144 1146 1145 1147 def _reset_output(self): … … 1235 1237 data_name_txt = wx.StaticText(self, -1, 'Data : ') 1236 1238 1237 self.data_name_tcl = OutputTextCtrl(self, -1,size=(260,20), style=0, 1238 name='data_name_tcl') 1239 self.data_name_tcl = OutputTextCtrl(self, -1,size=(260,20), style=0, name='data_name_tcl') 1239 1240 self.data_name_tcl.SetToolTipString("Data's name.") 1240 1241 self.loaded_data_name_sizer.AddMany([(self.data_txt, 0, … … 1252 1253 self.data_max_tcl = OutputTextCtrl(self, -1, size=(_BOX_WIDTH, 20), style=0, name='data_max_tcl') 1253 1254 self.data_max_tcl.SetToolTipString("The maximum value of q range.") 1254 1255 1255 self.data_range_sizer.AddMany([(data_range_txt, 0, wx.RIGHT, 10), 1256 1256 (data_min_txt, 0, wx.RIGHT, 10),
Note: See TracChangeset
for help on using the changeset viewer.