Fix modal item open/close in the outliner since removing tweak events

Correct check for left-mouse event which assumed the alternative was
a tweak event.

Also remove print added by accident.
This commit is contained in:
Campbell Barton 2022-03-02 21:59:14 +11:00
parent 102644cb8c
commit ccf4001458
2 changed files with 1 additions and 2 deletions

View File

@ -240,7 +240,7 @@ static int outliner_item_openclose_invoke(bContext *C, wmOperator *op, const wmE
outliner_tag_redraw_avoid_rebuild_on_open_change(space_outliner, region);
/* Only toggle once for single click toggling */
if (event->type == LEFTMOUSE) {
if ((event->type == LEFTMOUSE) && (event->val != KM_CLICK_DRAG)) {
return OPERATOR_FINISHED;
}

View File

@ -913,7 +913,6 @@ int WM_generic_select_modal(bContext *C, wmOperator *op, const wmEvent *event)
OPERATOR_RETVAL_CHECK(ret_value);
op->customdata = POINTER_FROM_INT((int)event->type);
if (ret_value & OPERATOR_RUNNING_MODAL) {
printf("Starting modal: %s\n", op->idname);
WM_event_add_modal_handler(C, op);
}
return ret_value | OPERATOR_PASS_THROUGH;