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:
authorJulian Eisel <eiseljulian@gmail.com>2019-09-08 17:53:24 +0300
committerYimingWu <xp8110@outlook.com>2019-09-12 04:13:03 +0300
commit775ff3b20d9f1fc04004589953544bb097d448a6 (patch)
tree7b65fcb63b4d84d1fb3b968049a3b534824af274
parent4442e060ba64d6876053190536195fac3c3334e1 (diff)
Fix T67756: File drag starts on file browser open
When the file browser was opened (from a temporary window since the file browser redesign) using a button in the UI, under certain conditions moving the mouse would trigger files to be dragged. Note that this has been an issue before the new file browser design was introduced, although under slightly different conditions. Steps to reproduce: * With factory settings, press F12 * Open a different image in the appearing Image Editor (not Render Result) * Make sure the window is not maximized * Press N to open the side bar, open Image tab * Click the folder icon there to change the image * Change to thumbnail display type in the appearing file browser * Cancel, click the folder icon again Moving the mouse now would start dragging files in most cases. The same issue could be reproduced in a similar way when installing lights/MatCaps or HDRIs through Preferences -> Lights -> Install...
-rw-r--r--source/blender/editors/interface/interface_handlers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 670397a7b8a..9a16cc6d41f 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -4299,7 +4299,7 @@ static int ui_do_but_EXIT(bContext *C, uiBut *but, uiHandleButtonData *data, con
if (data->state == BUTTON_STATE_HIGHLIGHT) {
/* first handle click on icondrag type button */
- if (event->type == LEFTMOUSE && but->dragpoin) {
+ if ((event->type == LEFTMOUSE) && (event->val == KM_PRESS) && but->dragpoin) {
if (ui_but_contains_point_px_icon(but, data->region, event)) {
/* tell the button to wait and keep checking further events to
@@ -4311,7 +4311,7 @@ static int ui_do_but_EXIT(bContext *C, uiBut *but, uiHandleButtonData *data, con
}
}
#ifdef USE_DRAG_TOGGLE
- if (event->type == LEFTMOUSE && ui_but_is_drag_toggle(but)) {
+ if ((event->type == LEFTMOUSE) && (event->val == KM_PRESS) && ui_but_is_drag_toggle(but)) {
button_activate_state(C, but, BUTTON_STATE_WAIT_DRAG);
data->dragstartx = event->x;
data->dragstarty = event->y;