2.5 / Nodes
* zoom in/out added also as menu entry * view all operator is now only executed, not invoked.
This commit is contained in:
@@ -591,12 +591,14 @@ static void do_node_viewmenu(bContext *C, void *arg, int event)
|
||||
ScrArea *sa= CTX_wm_area(C);
|
||||
|
||||
switch(event) {
|
||||
/* cases 1 and 2 are now handled automagically by View2D code */
|
||||
case 1: /* Zoom in */
|
||||
WM_operator_name_call(C, "View2D_OT_view_zoomin", WM_OP_EXEC_REGION_WIN, NULL);
|
||||
break;
|
||||
case 2: /* View all */
|
||||
WM_operator_name_call(C, "View2D_OT_view_zoomout", WM_OP_EXEC_REGION_WIN, NULL);
|
||||
break;
|
||||
case 3: /* View all */
|
||||
WM_operator_name_call(C, "NODE_OT_fit_all", WM_OP_INVOKE_REGION_WIN, NULL);
|
||||
WM_operator_name_call(C, "NODE_OT_fit_all", WM_OP_EXEC_REGION_WIN, NULL);
|
||||
break;
|
||||
case 4: /* Grease Pencil */
|
||||
// XXX add_blockhandler(sa, NODES_HANDLER_GREASEPENCIL, UI_PNL_UNSTOW);
|
||||
|
||||
@@ -203,11 +203,6 @@ static int node_fit_all_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
static int node_fit_all_invoke(bContext *C, wmOperator *op, wmEvent *event)
|
||||
{
|
||||
return node_fit_all_exec(C, op);
|
||||
}
|
||||
|
||||
void NODE_OT_fit_all(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
@@ -215,6 +210,6 @@ void NODE_OT_fit_all(wmOperatorType *ot)
|
||||
ot->idname= "NODE_OT_fit_all";
|
||||
|
||||
/* api callbacks */
|
||||
ot->invoke= node_fit_all_invoke;
|
||||
ot->exec= node_fit_all_exec;
|
||||
ot->poll= ED_operator_node_active;
|
||||
}
|
||||
Reference in New Issue
Block a user