Fix PyConsole: Drag events finished early in modal text selection
authorPhilipp Oeser <info@graphics-engineer.com>
Mon, 11 Jun 2018 08:18:51 +0000 (10:18 +0200)
committerPhilipp Oeser <info@graphics-engineer.com>
Mon, 11 Jun 2018 08:18:51 +0000 (10:18 +0200)
source/blender/editors/space_console/console_ops.c

index 4867d42030c3e835efb55d1f6f356263a4bcb54a..32cf5ea20556f70073cd2868fa86b605729288f1 100644 (file)
@@ -1140,8 +1140,11 @@ static int console_modal_select(bContext *C, wmOperator *op, const wmEvent *even
                case LEFTMOUSE:
                case MIDDLEMOUSE:
                case RIGHTMOUSE:
-                       console_cursor_set_exit(C, op);
-                       return OPERATOR_FINISHED;
+                       if (event->val == KM_RELEASE) {
+                               console_cursor_set_exit(C, op);
+                               return OPERATOR_FINISHED;
+                       }
+                       break;
                case MOUSEMOVE:
                        console_modal_select_apply(C, op, event);
                        break;