obj export had the overwrite confirmation commented out from testing, UIBlock needed to clear the events so tooltips show.

This commit is contained in:
Campbell Barton 2007-08-21 19:37:03 +00:00
parent 63a801c21d
commit 567e634253
2 changed files with 20 additions and 2 deletions

@ -512,8 +512,8 @@ def write_ui(filename):
if not filename.lower().endswith('.obj'):
filename += '.obj'
#if not BPyMessages.Warning_SaveOver(filename):
# return
if not BPyMessages.Warning_SaveOver(filename):
return
EXPORT_APPLY_MODIFIERS = Draw.Create(1)
EXPORT_ROTX90 = Draw.Create(1)

@ -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);
}