Changeset 235f514 in sasview for src/sas/sasgui/perspectives/invariant
- Timestamp:
- Apr 9, 2017 5:46:10 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:
- ac07a3a
- Parents:
- 5b2b04d
- Location:
- src/sas/sasgui/perspectives/invariant
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/invariant/invariant_panel.py
r959eb01 r235f514 240 240 """ 241 241 242 if state == None and data ==None:242 if state is None and data is None: 243 243 self.state = IState() 244 elif state == None or data ==None:244 elif state is None or data is None: 245 245 return 246 246 else: … … 604 604 compute invariant 605 605 """ 606 if self._data ==None:606 if self._data is None: 607 607 msg = "\n\nData must be loaded first in order" 608 608 msg += " to perform a compution..." … … 792 792 : param state_num: the given state number 793 793 """ 794 if state_num ==None:794 if state_num is None: 795 795 return 796 796 … … 924 924 :param event: rb/cb event 925 925 """ 926 if event ==None:926 if event is None: 927 927 return 928 928 obj = event.GetEventObject() … … 934 934 935 935 try: 936 if value ==None or value.lstrip().rstrip() == '':936 if value is None or value.lstrip().rstrip() == '': 937 937 value = 'None' 938 938 setattr(self.state, name, str(value)) … … 1013 1013 Used in 'set_current_data()' 1014 1014 """ 1015 #if data ==None: return1015 #if data is None: return 1016 1016 #temp_state = self.state.clone_state() 1017 1017 #copy.deepcopy(self.state.saved_state) … … 1049 1049 1050 1050 """ 1051 if self._data ==None:1051 if self._data is None: 1052 1052 return 1053 1053 # check if this event is from do/undo button … … 1072 1072 # try to add new state of the text changes in the state_list 1073 1073 try: 1074 if value.strip() ==None:1074 if value.strip() is None: 1075 1075 value = '' 1076 1076 setattr(self.state, name, str(value)) … … 1140 1140 the popup menu on bookmark context menu event 1141 1141 """ 1142 if self._data ==None:1142 if self._data is None: 1143 1143 return 1144 if event ==None:1144 if event is None: 1145 1145 return 1146 1146 self.bookmark_num += 1 … … 1206 1206 : event: popUpMenu event 1207 1207 """ 1208 if event ==None:1208 if event is None: 1209 1209 return 1210 1210 # get the object … … 1246 1246 if self.parent != None: 1247 1247 self._default_save_location = self.parent.get_save_location() 1248 if self._default_save_location ==None:1248 if self._default_save_location is None: 1249 1249 self._default_save_location = os.getcwd() 1250 1250 dlg = wx.FileDialog(self, "Choose a file", -
src/sas/sasgui/perspectives/invariant/invariant_state.py
r463e7ffc r235f514 787 787 raise RuntimeError, msg 788 788 # make sure title and data run is filled up. 789 if datainfo.title ==None or datainfo.title == '':789 if datainfo.title is None or datainfo.title == '': 790 790 datainfo.title = datainfo.name 791 if datainfo.run_name ==None or datainfo.run_name == {}:791 if datainfo.run_name is None or datainfo.run_name == {}: 792 792 datainfo.run = [str(datainfo.name)] 793 793 datainfo.run_name[0] = datainfo.name
Note: See TracChangeset
for help on using the changeset viewer.