Added search-browse to the Python ID template. Also added icon/button
for 'Add new'. (Note, we need icon for it).

Also fixed bug in search menu closing too quick on mouse-release, when
mouse was close to bottom of menu button.
And removed annoying warning if ID pointer was zero.
This commit is contained in:
2009-06-11 17:21:27 +00:00
parent 2c8fae1f8b
commit 4e66f6d11f
6 changed files with 204 additions and 121 deletions

View File

@@ -1263,7 +1263,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
/* exit on LMB only on RELEASE for searchbox, to mimic other popups, and allow multiple menu levels */
if(data->searchbox)
inbox= BLI_in_rcti(&data->searchbox->winrct, event->x, event->y);
inbox= ui_searchbox_inside(data->searchbox, event->x, event->y);
if(event->val==KM_PRESS) {
mx= event->x;
@@ -1287,6 +1287,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
}
}
else if(inbox) {
printf("release inside \n");
button_activate_state(C, but, BUTTON_STATE_EXIT);
retval= WM_UI_HANDLER_BREAK;
}