diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-01-11 07:03:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-01-11 07:03:19 +0300 |
commit | c012b94ca41a2e9cb3e652d1c316be11378521f8 (patch) | |
tree | 5ea082b9bceef9eeadbac788321556cf92822b79 /source/blender/src/toolbox.c | |
parent | 185c6bb49ce994d66fc67673b01a014161fa307d (diff) |
Fixed bug in do_clever_numbuts not displaying tooltips.
Comment:
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.
Diffstat (limited to 'source/blender/src/toolbox.c')
-rw-r--r-- | source/blender/src/toolbox.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c index c133046764a..b4692ca9964 100644 --- a/source/blender/src/toolbox.c +++ b/source/blender/src/toolbox.c @@ -1310,6 +1310,19 @@ int do_clever_numbuts(char *name, int tot, int winevent) int a, sizex, sizey, x1, y2; short mval[2], event; + /* 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) { + while( bwin_qread( sa->win, &temp_bevt ) ) {} + while( bwin_qread( sa->headwin, &temp_bevt ) ) {} + } + /* Done clearing events */ + + if(tot<=0 || tot>MAXNUMBUTS) return 0; getmouseco_sc(mval); |