diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-08-21 23:37:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-08-21 23:37:03 +0400 |
commit | 567e63425305084712527b9e24604558f1ea3881 (patch) | |
tree | f3f6c618d0d35f4b339433cd57fdc1f3fddc73bf /source/blender/python | |
parent | 63a801c21d054381d4eccd186dfea0d96533cfb3 (diff) |
obj export had the overwrite confirmation commented out from testing, UIBlock needed to clear the events so tooltips show.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/api2_2x/Draw.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Draw.c b/source/blender/python/api2_2x/Draw.c index db8b6305dc7..54ff927a2b3 100644 --- a/source/blender/python/api2_2x/Draw.c +++ b/source/blender/python/api2_2x/Draw.c @@ -1098,6 +1098,24 @@ static PyObject *Method_UIBlock( PyObject * self, PyObject * args ) PyErr_Print( ); error( "Python script error: check console" ); } else { + /* copied from do_clever_numbuts in toolbox.c */ + + /* Clear all events so tooltips work, this is not ideal and + only needed because calls from the menu still have some events + left over when do_clever_numbuts is called. + Calls from keyshortcuts do not have this problem.*/ + ScrArea *sa; + BWinEvent temp_bevt; + for (sa= G.curscreen->areabase.first; sa; sa= sa->next) { + if(sa->win) { + while( bwin_qread( sa->win, &temp_bevt ) ) {} + } + if(sa->headwin) { + while( bwin_qread( sa->headwin, &temp_bevt ) ) {} + } + } + /* Done clearing events */ + uiBoundsBlock(uiblock, 5); uiDoBlocks(&listb, 0); } |