Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r--source/blender/editors/interface/interface_handlers.c39
1 files changed, 33 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index f1c0df23fc9..0768d556911 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -2374,6 +2374,11 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data)
data->selextend = 0;
data->selstartx = 0.0f;
+#ifdef USE_DRAG_MULTINUM
+ /* this can happen from multi-drag */
+ data->applied_interactive = false;
+#endif
+
/* set cursor pos to the end of the text */
but->editstr = data->str;
but->pos = len;
@@ -3477,10 +3482,21 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
}
}
else if (event->type == LEFTMOUSE && event->val != KM_PRESS) {
- if (data->dragchange)
- button_activate_state(C, but, BUTTON_STATE_EXIT);
- else
+ if (data->dragchange) {
+#ifdef USE_DRAG_MULTINUM
+ /* if we started multibutton but didnt drag, then edit */
+ if (data->multi_data.init == BUTTON_MULTI_INIT_SETUP) {
+ click = 1;
+ }
+ else
+#endif
+ {
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
+ }
+ else {
click = 1;
+ }
}
else if (event->type == MOUSEMOVE) {
const enum eSnapType snap = ui_event_to_snap(event);
@@ -3763,10 +3779,21 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
}
}
else if (event->type == LEFTMOUSE && event->val != KM_PRESS) {
- if (data->dragchange)
- button_activate_state(C, but, BUTTON_STATE_EXIT);
- else
+ if (data->dragchange) {
+#ifdef USE_DRAG_MULTINUM
+ /* if we started multibutton but didnt drag, then edit */
+ if (data->multi_data.init == BUTTON_MULTI_INIT_SETUP) {
+ click = 1;
+ }
+ else
+#endif
+ {
+ button_activate_state(C, but, BUTTON_STATE_EXIT);
+ }
+ }
+ else {
click = 1;
+ }
}
else if (event->type == MOUSEMOVE) {
#ifdef USE_DRAG_MULTINUM