Changeset 04295ea in sasview for invariantview/perspectives/invariant
- Timestamp:
- Apr 22, 2011 11:29:20 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:
- 270e240
- Parents:
- cefb3fb
- Location:
- invariantview/perspectives/invariant
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
invariantview/perspectives/invariant/invariant.py
rcefb3fb r04295ea 233 233 msg += " be None in standalone mode" 234 234 raise RuntimeError, msg 235 235 # Make sure the user sees the invariant panel after loading 236 #self.parent.set_perspective(self.perspective) 237 self.on_perspective(event=None) 236 238 name = data.meta_data['invstate'].file 237 239 data.meta_data['invstate'].file = name 238 240 data.name = name 239 241 data.filename = name 242 240 243 data = self.parent.create_gui_data(data,None) 241 244 self.__data = data … … 247 250 self.invariant_panel.is_state_data = True 248 251 249 # Make sure the user sees the invariant panel after loading250 #self.parent.set_perspective(self.perspective)251 self.on_perspective(event=None)252 252 # Load the invariant states 253 temp_state0 = self.invariant_panel.state.state_list['0']254 253 self.temp_state = state 255 256 self.invariant_panel.set_state(state=self.temp_state,data=self.__data) 257 # Must reset the 1st state using the state from file 258 self.invariant_panel.state.state_list['0'] = temp_state0 254 # Requires to have self.__data and self.temp_state first. 255 self.on_set_state_helper(None) 256 259 257 except: 260 258 logging.error("invariant.set_state: %s" % sys.exc_value) -
invariantview/perspectives/invariant/invariant_panel.py
rcefb3fb r04295ea 169 169 set state when loading it from a .inv/.svs file 170 170 """ 171 171 172 if state == None and data == None: 172 173 self.state = IState() 173 174 elif state == None or data == None: return 174 175 else: 176 new_state = copy.deepcopy(state) 175 177 self.new_state = True 176 178 if not self.set_data(data): 177 179 return 178 self.state = state 180 181 self.state = new_state 179 182 self.state.file = data.name 180 183 … … 188 191 self.bookmark_num = len(self.state.bookmark_list) 189 192 total_bookmark_num = self.bookmark_num + 1 193 190 194 for ind in range(1,total_bookmark_num): 191 195 #bookmark_num = ind … … 196 200 self.popUpMenu.Append(id,name,str('')) 197 201 wx.EVT_MENU(self, id, self._back_to_bookmark) 198 199 202 wx.PostEvent(self.parent, AppendBookmarkEvent(title=name, 200 203 hint='',
Note: See TracChangeset
for help on using the changeset viewer.