2.5
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:
parent
d2ea71a296
commit
59333375b3
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user