- Timestamp:
- Oct 21, 2015 8:35:00 AM (9 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:
- 85130cb
- Parents:
- 2d88fc4
- Location:
- sasview
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasview/sasview.py
r6f3fea2 r6f16e25 75 75 logging.error("Wx version: error reading version") 76 76 77 #from . import wxcruft78 #wxcruft.call_later_fix()77 from . import wxcruft 78 wxcruft.call_later_fix() 79 79 #wxcruft.trace_new_id() 80 80 -
sasview/wxcruft.py
r2d88fc4 r6f16e25 15 15 def NewId(): 16 16 id = wx._misc.NewId() 17 frame = inspect.stack()[1] 17 path, line, function = _get_caller() 18 if path == "sas/guiframe/utils.py": 19 # Special case: NewId is being called via an IdList request; we 20 # want to which widget triggered the request, not that it was 21 # triggered via IdList. 22 path, line, function = _get_caller(2) 23 tag = " via IdList" 24 elif path.endswith("/wxcruft.py"): 25 # Special case: NewId is being called via CallLater; we want to 26 # know where the CallLater was invoked. 27 path, line, function = _get_caller(1) 28 tag = " via CallLater" 29 else: 30 tag = "" 31 print "NewId %d from %s(%d):%s%s"%(id, path, line, function, tag) 32 return id 33 34 def _get_caller(distance=0): 35 frame = inspect.stack()[distance+2] 18 36 path = frame[1] 19 37 index = path.find('/sas/') 20 38 if index == -1: index = path.find('\\sas\\') 21 path = path[index+1:] 22 print "NewId %d from %s(%d):%s"%(id, path, frame[2], frame[3]) 23 return id 39 return path[index+1:], frame[2], frame[3] 40 24 41 25 42
Note: See TracChangeset
for help on using the changeset viewer.