Two small fixes;
- Search menu options text could overlap with hotkey
- Operator "duplicate area into window" didnt work for non-actionzone
This commit is contained in:
Ton Roosendaal 2009-06-04 14:32:10 +00:00
parent d2ea71a296
commit 59333375b3
2 changed files with 16 additions and 8 deletions

@ -1951,7 +1951,7 @@ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, char *name, int state)
cpoin= strchr(name, '|');
if(cpoin) {
*cpoin= 0;
rect->xmax -= BLF_width(cpoin+1) -10;
rect->xmax -= BLF_width(cpoin+1) + 10;
}
glColor3ubv(wt->wcol.text);

@ -608,18 +608,25 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event)
bScreen *newsc, *sc;
ScrArea *sa;
rcti rect;
sActionzoneData *sad= event->customdata;
if(sad==NULL)
return OPERATOR_PASS_THROUGH;
win= CTX_wm_window(C);
sc= CTX_wm_screen(C);
sa= sad->sa1;
sa= CTX_wm_area(C);
/* XXX hrmf! */
if(event->type==EVT_ACTIONZONE_AREA) {
sActionzoneData *sad= event->customdata;
if(sad==NULL)
return OPERATOR_PASS_THROUGH;
sa= sad->sa1;
}
/* poll() checks area context, but we don't accept full-area windows */
if(sc->full != SCREENNORMAL) {
actionzone_exit(C, op);
if(event->type==EVT_ACTIONZONE_AREA)
actionzone_exit(C, op);
return OPERATOR_CANCELLED;
}
@ -638,7 +645,8 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* screen, areas init */
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
actionzone_exit(C, op);
if(event->type==EVT_ACTIONZONE_AREA)
actionzone_exit(C, op);
return OPERATOR_FINISHED;
}