Changeset 7432acb in sasview for src/sas/sasgui/perspectives/invariant
- Timestamp:
- Apr 9, 2017 6:11:31 AM (8 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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 45dffa69
- Parents:
- ac07a3a
- Location:
- src/sas/sasgui/perspectives/invariant
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/invariant/invariant.py
r959eb01 r7432acb 331 331 new_plot.title = self.__data.title 332 332 # Save theory_data in a state 333 if data !=None:333 if data is not None: 334 334 name_head = name.split('-') 335 335 if name_head[0] == 'Low': … … 353 353 354 354 # Save data in a state: but seems to never happen 355 if new_plot !=None:355 if new_plot is not None: 356 356 self.invariant_panel.state.data = copy.deepcopy(new_plot) 357 357 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, -
src/sas/sasgui/perspectives/invariant/invariant_panel.py
r235f514 r7432acb 609 609 wx.PostEvent(self.parent, StatusEvent(status=msg)) 610 610 # set a state for this computation for saving 611 elif event !=None:611 elif event is not None: 612 612 self._set_compute_state(state='compute') 613 613 self._set_bookmark_flag(True) … … 718 718 self._set_preview_flag(True) 719 719 720 if event !=None:720 if event is not None: 721 721 self._set_preview_flag(True) 722 722 self._set_save_flag(True) … … 1022 1022 self.state.saved_state['state_num'] = 0 1023 1023 self.state.saved_state['compute_num'] = 0 1024 if self._data !=None:1024 if self._data is not None: 1025 1025 self.state.saved_state['file'] = str(self._data.name) 1026 1026 else: … … 1244 1244 # Ask the user the location of the file to write to. 1245 1245 path = None 1246 if self.parent !=None:1246 if self.parent is not None: 1247 1247 self._default_save_location = self.parent.get_save_location() 1248 1248 if self._default_save_location is None: … … 1254 1254 path = dlg.GetPath() 1255 1255 self._default_save_location = os.path.dirname(path) 1256 if self.parent !=None:1256 if self.parent is not None: 1257 1257 self.parent._default_save_location = \ 1258 1258 self._default_save_location … … 1393 1393 Enable and disable the power value editing 1394 1394 """ 1395 if event !=None:1395 if event is not None: 1396 1396 self._set_bookmark_flag(True) 1397 1397 self._set_preview_flag(False) … … 1411 1411 Disable or enable some button if the user enable low q extrapolation 1412 1412 """ 1413 if event !=None:1413 if event is not None: 1414 1414 self._set_bookmark_flag(True) 1415 1415 self._set_preview_flag(False) … … 1438 1438 Enable editing power law section at low q range 1439 1439 """ 1440 if event !=None:1440 if event is not None: 1441 1441 self._set_bookmark_flag(True) 1442 1442 self._set_preview_flag(False) … … 1537 1537 Enable and disable the power value editing 1538 1538 """ 1539 if event !=None:1539 if event is not None: 1540 1540 self._set_bookmark_flag(True) 1541 1541 … … 1554 1554 Disable or enable some button if the user enable high q extrapolation 1555 1555 """ 1556 if event !=None:1556 if event is not None: 1557 1557 self._set_bookmark_flag(True) 1558 1558 self._set_preview_flag(False) -
src/sas/sasgui/perspectives/invariant/invariant_state.py
r235f514 r7432acb 281 281 # File name 282 282 element = newdoc.createElement("filename") 283 if self.file !=None and self.file != '':283 if self.file is not None and self.file != '': 284 284 element.appendChild(newdoc.createTextNode(str(self.file))) 285 285 else: … … 734 734 # invstate could be None when .svs file is loaded 735 735 # in this case, skip appending to output 736 if invstate !=None:736 if invstate is not None: 737 737 sas_entry.meta_data['invstate'] = invstate 738 738 sas_entry.filename = invstate.file
Note: See TracChangeset
for help on using the changeset viewer.