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>2016-09-21 01:29:28 +0300
committerJulian Eisel <eiseljulian@gmail.com>2016-09-21 01:44:14 +0300
commitc5326958a5f3d5ed07b0a69822bb049ca21f5aac (patch)
tree53199bdf5e3702ce18a03dd501982708f3574784
parent2382d1c401d1c271fa47122a36b77f9b6f06a32f (diff)
UI: Fix crash using drag-toggle over window bounds with button callback
Steps to reproduce: * Go to modifier context in properties editor * Add modifier, collapse it * Press down LMB over collapse button of modifier, hold it * Drag over pin-icon in properties editor (to keep fixed data-block displayed) * Drag outside of window bounds (should crash) Also could've solved by getting space data from callback arguments instead of context, but this fix is much nicer (though not totally un-risky).
-rw-r--r--source/blender/editors/interface/interface_handlers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 933beaf6afb..3d3e9f96332 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -1266,6 +1266,10 @@ static bool ui_drag_toggle_set_xy_xy(
}
}
}
+ if (changed) {
+ /* apply now, not on release (or if handlers are cancelled for whatever reason) */
+ ui_apply_but_funcs_after(C);
+ }
return changed;
}