Changeset 7432acb in sasview for src/sas/sasgui/perspectives
- 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
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/calculator/data_operator.py
r235f514 r7432acb 182 182 On data name typing 183 183 """ 184 if event !=None:184 if event is not None: 185 185 event.Skip() 186 186 item = event.GetEventObject() … … 264 264 self.put_text_pic(self.data2_pic, content=str(val)) 265 265 self.check_data_inputs() 266 if self.output !=None:266 if self.output is not None: 267 267 self.output.name = str(self.data_namectr.GetValue()) 268 268 self.draw_output(self.output) … … 284 284 self.data1_pic.add_image(data) 285 285 self.check_data_inputs() 286 if self.output !=None:286 if self.output is not None: 287 287 self.output.name = str(self.data_namectr.GetValue()) 288 288 self.draw_output(self.output) … … 297 297 self.put_text_pic(self.operator_pic, content=text) 298 298 self.check_data_inputs() 299 if self.output !=None:299 if self.output is not None: 300 300 self.output.name = str(self.data_namectr.GetValue()) 301 301 self.draw_output(self.output) … … 329 329 data = None 330 330 item.SetClientData(pos, data) 331 if data !=None:331 if data is not None: 332 332 self.check_data_inputs() 333 333 334 334 self.put_text_pic(self.data2_pic, content) 335 335 336 if self.output !=None:336 if self.output is not None: 337 337 self.output.name = str(self.data_namectr.GetValue()) 338 338 self.draw_output(self.output) … … 472 472 On Focus at this window 473 473 """ 474 if event !=None:474 if event is not None: 475 475 event.Skip() 476 476 self._data = self.get_datalist() … … 534 534 ids = self._data.keys() 535 535 for id in ids: 536 if id !=None:537 if self._data[id].data !=None:536 if id is not None: 537 if self._data[id].data is not None: 538 538 dnames.append(self._data[id].data.name) 539 539 else: … … 546 546 for datastate in val_list: 547 547 data = datastate.data 548 if data !=None:548 if data is not None: 549 549 name = data.name 550 550 pos1 = self.data1_cbox.Append(str(name)) … … 577 577 """ 578 578 data_manager = self.parent.parent.get_data_manager() 579 if data_manager !=None:579 if data_manager is not None: 580 580 return data_manager.get_all_data() 581 581 else: … … 983 983 On close event 984 984 """ 985 if self.manager !=None:985 if self.manager is not None: 986 986 self.manager.data_operator_frame = None 987 987 self.panel.disconnect_panels() -
src/sas/sasgui/perspectives/calculator/density_panel.py
r235f514 r7432acb 438 438 On close event 439 439 """ 440 if self.manager !=None:440 if self.manager is not None: 441 441 self.manager.cal_md_frame = None 442 442 self.Destroy() -
src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py
rac07a3a r7432acb 61 61 Add icon in the frame 62 62 """ 63 if parent !=None:63 if parent is not None: 64 64 if hasattr(frame, "IsIconized"): 65 65 if not frame.IsIconized(): … … 74 74 Set_error dialog 75 75 """ 76 if item !=None:76 if item is not None: 77 77 item.SetBackgroundColour("pink") 78 78 item.Refresh() 79 79 if show_msg: 80 80 msg = "Error: wrong (or out of range) value entered." 81 if panel.parent.parent !=None:81 if panel.parent.parent is not None: 82 82 wx.PostEvent(panel.parent.parent, 83 83 StatusEvent(status=msg, info='Error')) … … 425 425 """ 426 426 unit = 'sec' 427 if self.time_text !=None:427 if self.time_text is not None: 428 428 self.time_text.SetForegroundColour('black') 429 429 etime = self.estimate_ctime() … … 633 633 self.model.set_sld_data(self.sld_data) 634 634 635 self.draw_button.Enable(self.sld_data !=None)635 self.draw_button.Enable(self.sld_data is not None) 636 636 wx.CallAfter(self.parent.set_sld_data, self.sld_data) 637 637 self._update_model_params() … … 855 855 """ 856 856 flag = self.parent.check_omfpanel_inputs() 857 if not flag and self.parent.parent !=None:857 if not flag and self.parent.parent is not None: 858 858 infor = 'Error' 859 859 msg = 'Error: Wrong inputs in the SLD info panel.' … … 865 865 self.sld_data = self.parent.get_sld_from_omf() 866 866 if self.sld_data is None: 867 if self.parent.parent !=None:867 if self.parent.parent is not None: 868 868 infor = 'Error' 869 869 msg = 'Error: No data has been selected.' … … 971 971 self.bt_compute.SetLabel(label) 972 972 self.bt_compute.SetToolTipString(label) 973 if self.parent.parent !=None:973 if self.parent.parent is not None: 974 974 wx.PostEvent(self.parent.parent, 975 975 StatusEvent(status=msg, type=type)) … … 995 995 for ind in range(len(input[0])): 996 996 if self.is_avg: 997 if ind % 1 == 0 and update !=None:997 if ind % 1 == 0 and update is not None: 998 998 update() 999 999 time.sleep(0.1) … … 1002 1002 out = np.append(out, outi) 1003 1003 else: 1004 if ind % 50 == 0 and update !=None:1004 if ind % 50 == 0 and update is not None: 1005 1005 update() 1006 1006 time.sleep(0.001) … … 1151 1151 new_plot.label = new_plot.id 1152 1152 #theory_data = deepcopy(new_plot) 1153 if self.parent.parent !=None:1153 if self.parent.parent is not None: 1154 1154 self.parent.parent.update_theory(data_id=new_plot.id, 1155 1155 theory=new_plot, … … 1210 1210 new_plot.label = new_plot.id 1211 1211 #theory_data = deepcopy(new_plot) 1212 if self.parent.parent !=None:1212 if self.parent.parent is not None: 1213 1213 self.parent.parent.update_theory(data_id=data.id, 1214 1214 theory=new_plot, … … 1299 1299 mz = sld_sets[key] 1300 1300 else: 1301 if sld_sets[key] !=None:1301 if sld_sets[key] is not None: 1302 1302 self.sld_data.set_sldn(sld_sets[key]) 1303 1303 self.sld_data.set_sldms(mx, my, mz) … … 1347 1347 infor = 'Error' 1348 1348 #logger.error(msg) 1349 if self.parent.parent !=None:1349 if self.parent.parent is not None: 1350 1350 # inform msg to wx 1351 1351 wx.PostEvent(self.parent.parent, … … 1690 1690 data = self.parent.get_sld_data() 1691 1691 fName = os.path.splitext(path)[0] + '.' + extension.split('.')[-1] 1692 if data !=None:1692 if data is not None: 1693 1693 try: 1694 1694 reader.write(fName, data) … … 1699 1699 infor = 'Error' 1700 1700 #logger.error(msg) 1701 if self.parent.parent !=None:1701 if self.parent.parent is not None: 1702 1702 # inform msg to wx 1703 1703 wx.PostEvent(self.parent.parent, … … 1708 1708 msg = "Error occurred while saving. " 1709 1709 infor = 'Error' 1710 if self.parent.parent !=None:1710 if self.parent.parent is not None: 1711 1711 # inform msg to wx 1712 1712 wx.PostEvent(self.parent.parent, … … 1718 1718 """ 1719 1719 flag = True 1720 if event !=None:1720 if event is not None: 1721 1721 event.Skip() 1722 1722 ctl = event.GetEventObject() … … 1758 1758 """ 1759 1759 flag = True 1760 if event !=None:1760 if event is not None: 1761 1761 event.Skip() 1762 1762 ctl = event.GetEventObject() … … 1974 1974 Send full draw to gui frame 1975 1975 """ 1976 if self.parent !=None:1976 if self.parent is not None: 1977 1977 self.parent.set_schedule_full_draw(panel, func) 1978 1978 … … 2050 2050 Close 2051 2051 """ 2052 if self.base !=None:2052 if self.base is not None: 2053 2053 self.base.gen_frame = None 2054 2054 self.Destroy() -
src/sas/sasgui/perspectives/calculator/image_viewer.py
r235f514 r7432acb 70 70 plot_frame.SetTitle('Picture -- %s --' % basename) 71 71 plot_frame.Show(True) 72 if parent !=None:72 if parent is not None: 73 73 parent.put_icon(plot_frame) 74 74 except: … … 403 403 output.is_data = True 404 404 output = reader2D_converter(output) 405 if self.base !=None:405 if self.base is not None: 406 406 data = self.base.create_gui_data(output, self.title) 407 407 self.base.add_data({data.id:data}) -
src/sas/sasgui/perspectives/calculator/kiessig_calculator_panel.py
r959eb01 r7432acb 190 190 """ 191 191 # skip for another event 192 if event !=None:192 if event is not None: 193 193 event.Skip() 194 194 dq = self.dq_name_tcl.GetValue() … … 237 237 Close event 238 238 """ 239 if self.manager !=None:239 if self.manager is not None: 240 240 self.manager.kiessig_frame = None 241 241 self.Destroy() -
src/sas/sasgui/perspectives/calculator/model_editor.py
r235f514 r7432acb 387 387 self._msg_box.SetLabel(msg) 388 388 self._msg_box.SetForegroundColour(color) 389 if self.parent.parent !=None:389 if self.parent.parent is not None: 390 390 from sas.sasgui.guiframe.events import StatusEvent 391 391 wx.PostEvent(self.parent.parent, StatusEvent(status=msg, … … 478 478 """ 479 479 # For Mac 480 if event !=None:480 if event is not None: 481 481 event.Skip() 482 482 item = event.GetEventObject() … … 979 979 980 980 # Prepare the messagebox 981 if self.base !=None and not msg:981 if self.base is not None and not msg: 982 982 self.base.update_custom_combo() 983 983 # Passed exception in import test as it will fail for sasmodels.sasview_model class … … 1002 1002 self._msg_box.SetForegroundColour(color) 1003 1003 # Send msg to the top window 1004 if self.base !=None:1004 if self.base is not None: 1005 1005 from sas.sasgui.guiframe.events import StatusEvent 1006 1006 wx.PostEvent(self.base.parent, … … 1190 1190 """ 1191 1191 self.Show(False) 1192 #if self.parent !=None:1192 #if self.parent is not None: 1193 1193 # self.parent.new_model_frame = None 1194 1194 #self.Destroy() -
src/sas/sasgui/perspectives/calculator/pyconsole.py
rddbac66 r7432acb 118 118 self.panel = panel 119 119 self._add_menu() 120 if filename !=None:120 if filename is not None: 121 121 dataDir = os.path.dirname(filename) 122 elif self.parent !=None:122 elif self.parent is not None: 123 123 dataDir = self.parent._default_save_location 124 124 else: … … 128 128 129 129 # See if there is a corresponding C file 130 if filename !=None:130 if filename is not None: 131 131 c_filename = os.path.splitext(filename)[0] + ".c" 132 132 if os.path.isfile(c_filename): … … 244 244 245 245 # See if there is a corresponding C file 246 if result.path !=None:246 if result.path is not None: 247 247 c_filename = os.path.splitext(result.path)[0] + ".c" 248 248 if os.path.isfile(c_filename): … … 303 303 304 304 # Update plugin model list in fitpage combobox 305 if success and self._manager != None and self.panel !=None:305 if success and self._manager is not None and self.panel is not None: 306 306 self._manager.set_edit_menu_helper(self.parent) 307 307 wx.CallAfter(self._manager.update_custom_combo) … … 337 337 Close event 338 338 """ 339 if self.base !=None:339 if self.base is not None: 340 340 self.base.py_frame = None 341 341 self.Destroy() -
src/sas/sasgui/perspectives/calculator/resolution_calculator_panel.py
r235f514 r7432acb 656 656 event.Skip() 657 657 # Clear the plot 658 if self.image !=None:658 if self.image is not None: 659 659 self.image.clf() 660 660 # reset image … … 674 674 """ 675 675 # Skip event for next event 676 if event !=None:676 if event is not None: 677 677 event.Skip() 678 678 msg = "Please Check your input values " … … 708 708 # Validate the wave inputs 709 709 wave_input = self._validate_q_input(wavelength, wavelength_spread) 710 if wave_input !=None:710 if wave_input is not None: 711 711 wavelength, wavelength_spread = wave_input 712 712 … … 757 757 # Validate the q inputs 758 758 q_input = self._validate_q_input(self.qx, self.qy) 759 if q_input !=None:759 if q_input is not None: 760 760 self.qx, self.qy = q_input 761 761 … … 769 769 770 770 # Compute the resolution 771 if self.image !=None:771 if self.image is not None: 772 772 #_pylab_helpers.Gcf.set_active(self.fm) 773 773 _pylab_helpers.Gcf.figs = {} … … 982 982 """ 983 983 # skip for another event 984 if event !=None:984 if event is not None: 985 985 event.Skip() 986 986 # init resolution_calculator … … 1148 1148 Set the detector coordinate for sigmas to x-y coordinate 1149 1149 """ 1150 if event !=None:1150 if event is not None: 1151 1151 event.Skip() 1152 1152 # Set the coordinate in Cartesian … … 1160 1160 Set the detector coordinate for sigmas to polar coordinate 1161 1161 """ 1162 if event !=None:1162 if event is not None: 1163 1163 event.Skip() 1164 1164 # Set the coordinate in polar … … 1181 1181 self.compute_button.SetLabel(label) 1182 1182 self.compute_button.SetToolTipString(label) 1183 if self.parent.parent !=None:1183 if self.parent.parent is not None: 1184 1184 wx.PostEvent(self.parent.parent, 1185 1185 StatusEvent(status=msg, type=type)) … … 1196 1196 On source combobox selection 1197 1197 """ 1198 if event !=None:1198 if event is not None: 1199 1199 combo = event.GetEventObject() 1200 1200 event.Skip() … … 1215 1215 On source color combobox selection 1216 1216 """ 1217 if event !=None:1217 if event is not None: 1218 1218 #combo = event.GetEventObject() 1219 1219 event.Skip() … … 1253 1253 On spectrum ComboBox event 1254 1254 """ 1255 if event !=None:1255 if event is not None: 1256 1256 #combo = event.GetEventObject() 1257 1257 event.Skip() … … 1348 1348 """ 1349 1349 _pylab_helpers.Gcf.figs = {} 1350 if self.manager !=None:1350 if self.manager is not None: 1351 1351 self.manager.cal_res_frame = None 1352 1352 self.Destroy() -
src/sas/sasgui/perspectives/calculator/sld_panel.py
r959eb01 r7432acb 504 504 On close event 505 505 """ 506 if self.manager !=None:506 if self.manager is not None: 507 507 self.manager.sld_frame = None 508 508 self.Destroy() -
src/sas/sasgui/perspectives/calculator/slit_length_calculator_panel.py
r235f514 r7432acb 303 303 Close event 304 304 """ 305 if self.manager !=None:305 if self.manager is not None: 306 306 self.manager.cal_slit_frame = None 307 307 self.Destroy() -
src/sas/sasgui/perspectives/corfunc/corfunc_panel.py
r1dc8ec9 r7432acb 320 320 path = None 321 321 default_save_location = os.getcwd() 322 if self._manager.parent !=None:322 if self._manager.parent is not None: 323 323 default_save_location = self._manager.parent.get_save_location() 324 324 … … 329 329 path = dlg.GetPath() 330 330 default_save_location = os.path.dirname(path) 331 if self._manager.parent !=None:331 if self._manager.parent is not None: 332 332 self._manager.parent._default_save_location = default_save_location 333 333 else: -
src/sas/sasgui/perspectives/corfunc/corfunc_state.py
r235f514 r7432acb 293 293 corstate = self._parse_state(entry) 294 294 295 if corstate !=None:295 if corstate is not None: 296 296 sas_entry.meta_data['corstate'] = corstate 297 297 sas_entry.filename = corstate.file -
src/sas/sasgui/perspectives/fitting/batchfitpage.py
ree4b3cb r7432acb 200 200 # self.state.formfactorcombobox = self.formfactorbox.GetCurrentSelection() 201 201 # 202 # if self.model !=None:202 # if self.model is not None: 203 203 # self._set_copy_flag(True) 204 204 # self._set_paste_flag(True) 205 # if self.data !=None:205 # if self.data is not None: 206 206 # self._set_bookmark_flag(False) 207 207 # self._keep.Enable(False) … … 225 225 # 226 226 # 227 # if event !=None:227 # if event is not None: 228 228 # ## post state to fit panel 229 229 # new_event = PageInfoEvent(page = self) … … 254 254 # is_modified = False 255 255 # 256 # if self.model != None:256 # if self.model is not None: 257 257 # ##Check the values 258 258 # self._check_value_enter( self.fittable_param) … … 291 291 # else: 292 292 # #self.btFit.Enable(True) 293 # if self._is_2D() and self.data !=None:293 # if self._is_2D() and self.data is not None: 294 294 # self.btEditMask.Enable(True) 295 295 # … … 335 335 # self._set_save_flag(False) 336 336 # else: 337 # if self.model !=None:337 # if self.model is not None: 338 338 # self._set_bookmark_flag(False) 339 339 # self._keep.Enable(False) -
src/sas/sasgui/perspectives/fitting/fitting.py
r235f514 r7432acb 302 302 Make new model 303 303 """ 304 if self.new_model_frame !=None:304 if self.new_model_frame is not None: 305 305 self.new_model_frame.Show(False) 306 306 self.new_model_frame.Show(True) … … 441 441 wx.PostEvent(self.parent, StatusEvent(status=msg)) 442 442 443 if page !=None:443 if page is not None: 444 444 return set_focus_page(page) 445 445 if caption == "Const & Simul Fit": … … 634 634 state = self.temp_state[self.state_index] 635 635 #panel state should have model selection to set_state 636 if state.formfactorcombobox !=None:636 if state.formfactorcombobox is not None: 637 637 #set state 638 638 data = self.parent.create_gui_data(state.data) … … 1016 1016 return False 1017 1017 ## If a thread is already started, stop it 1018 #if self.calc_fit !=None and self.calc_fit.isrunning():1018 #if self.calc_fitis not None and self.calc_fit.isrunning(): 1019 1019 # self.calc_fit.stop() 1020 1020 msg = "Fitting is in progress..." … … 1106 1106 page = self.fit_panel.add_empty_page() 1107 1107 # add data associated to the page created 1108 if page !=None:1108 if page is not None: 1109 1109 evt = StatusEvent(status="Page Created", info="info") 1110 1110 wx.PostEvent(self.parent, evt) … … 1216 1216 for item in param: 1217 1217 ## check if constraint 1218 if item[0] != None and item[1] !=None:1218 if item[0] is not None and item[1] is not None: 1219 1219 listOfConstraint.append((item[0], item[1])) 1220 1220 new_model = model … … 1457 1457 cell.value = index 1458 1458 1459 if theory_data !=None:1459 if theory_data is not None: 1460 1460 #Suucessful fit 1461 1461 theory_data.id = wx.NewId() … … 1544 1544 #(CallAfter is important to MAC) 1545 1545 try: 1546 #if res !=None:1546 #if res is not None: 1547 1547 wx.CallAfter(cpage.onsetValues, res.fitness, 1548 1548 res.param_list, … … 2010 2010 if index is None: 2011 2011 index = np.ones(len(data_copy.data), dtype=bool) 2012 if weight !=None:2012 if weight is not None: 2013 2013 data_copy.err_data = weight 2014 2014 # get rid of zero error points … … 2025 2025 if index is None: 2026 2026 index = np.ones(len(data_copy.y), dtype=bool) 2027 if weight !=None:2027 if weight is not None: 2028 2028 data_copy.dy = weight 2029 2029 if data_copy.dy is None or data_copy.dy == []: -
src/sas/sasgui/perspectives/fitting/model_thread.py
r235f514 r7432acb 56 56 self.qmin = 0 57 57 if self.qmax is None: 58 if self.data !=None:58 if self.data is not None: 59 59 newx = math.pow(max(math.fabs(self.data.xmax), 60 60 math.fabs(self.data.xmin)), 2) -
src/sas/sasgui/perspectives/fitting/report_dialog.py
r959eb01 r7432acb 39 39 self.nimages = len(self.report_list[2]) 40 40 41 if self.report_list[2] !=None:41 if self.report_list[2] is not None: 42 42 # put image path in the report string 43 43 if len(self.report_list[2]) == 1: -
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 -
src/sas/sasgui/perspectives/pr/inversion_panel.py
r235f514 r7432acb 271 271 # Ask the user the location of the file to write to. 272 272 path = None 273 if self.parent !=None:273 if self.parent is not None: 274 274 self._default_save_location = self.parent._default_save_location 275 275 dlg = wx.FileDialog(self, "Choose a file", … … 279 279 path = dlg.GetPath() 280 280 self._default_save_location = os.path.dirname(path) 281 if self.parent !=None:281 if self.parent is not None: 282 282 self.parent._default_save_location = self._default_save_location 283 283 else: -
src/sas/sasgui/perspectives/pr/inversion_state.py
r959eb01 r7432acb 473 473 #prstate could be None when .svs file is loaded 474 474 #in this case, skip appending to output 475 if prstate !=None:475 if prstate is not None: 476 476 sas_entry.meta_data['prstate'] = prstate 477 477 sas_entry.filename = prstate.file -
src/sas/sasgui/perspectives/pr/pr.py
rac07a3a r7432acb 721 721 722 722 # If a thread is already started, stop it 723 if self.calc_thread !=None and self.calc_thread.isrunning():723 if self.calc_thread is not None and self.calc_thread.isrunning(): 724 724 self.calc_thread.stop() 725 725 ## stop just raises the flag -- the thread is supposed to … … 1129 1129 1130 1130 # If a thread is already started, stop it 1131 if self.estimation_thread !=None and \1131 if self.estimation_thread is not None and \ 1132 1132 self.estimation_thread.isrunning(): 1133 1133 self.estimation_thread.stop() … … 1159 1159 1160 1160 # If a thread is already started, stop it 1161 if self.estimation_thread !=None and self.estimation_thread.isrunning():1161 if self.estimation_thread is not None and self.estimation_thread.isrunning(): 1162 1162 self.estimation_thread.stop() 1163 1163 ## stop just raises the flag -- the thread is supposed to -
src/sas/sasgui/perspectives/simulation/simulation.py
r959eb01 r7432acb 213 213 214 214 # If a computation thread is running, stop it 215 if self.calc_thread_1D !=None and self.calc_thread_1D.isrunning():215 if self.calc_thread_1D is not None and self.calc_thread_1D.isrunning(): 216 216 self.calc_thread_1D.stop() 217 217 ## stop just raises the flag -- the thread is supposed to
Note: See TracChangeset
for help on using the changeset viewer.