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:
authorAndrea Weikert <elubie@gmx.net>2019-08-18 17:34:39 +0300
committerAndrea Weikert <elubie@gmx.net>2019-08-18 17:42:41 +0300
commit38380ddca373cd7f49e3d6e831480ff05a2af72e (patch)
tree4aa23983fd0f9454b30f99b0258712b8c21b6284 /source/blender/editors/screen/screen_ops.c
parent454b120f48201abe2e1a9ca7e5d25c28cb04013a (diff)
Fix T67008: Missing move handle and flickering in FileBrowser
Fix T67008: Missing move handle and flickering in FileBrowser Allow split regions (child regions) to contribute to the action zones (azone) of the parent region. This fixes the issues in file browser and also in the user preferences. Reviewers: Severin, mont29, campbellbarton Reviewed By: Severin, mont29, campbellbarton Subscribers: brecht, campbellbarton Maniphest Tasks: T67008 Differential Revision: https://developer.blender.org/D5273
Diffstat (limited to 'source/blender/editors/screen/screen_ops.c')
-rw-r--r--source/blender/editors/screen/screen_ops.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 885cd1ee77d..72fec68070b 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -2458,6 +2458,15 @@ static int area_max_regionsize(ScrArea *sa, ARegion *scalear, AZEdge edge)
return dist;
}
+static bool is_split_edge(const int alignment, const AZEdge edge)
+{
+ return ((alignment == RGN_ALIGN_BOTTOM) && (edge == AE_TOP_TO_BOTTOMRIGHT)) ||
+ ((alignment == RGN_ALIGN_TOP) && (edge == AE_BOTTOM_TO_TOPLEFT)) ||
+ ((alignment == RGN_ALIGN_LEFT) && (edge == AE_RIGHT_TO_TOPLEFT)) ||
+ ((alignment == RGN_ALIGN_RIGHT) && (edge == AE_LEFT_TO_TOPRIGHT));
+
+}
+
static int region_scale_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
sActionzoneData *sad = event->customdata;
@@ -2476,7 +2485,16 @@ static int region_scale_invoke(bContext *C, wmOperator *op, const wmEvent *event
op->customdata = rmd;
rmd->az = az;
- rmd->ar = az->ar;
+ /* special case for region within region - this allows the scale of
+ * the parent region if the azone edge is not the edge splitting
+ * both regions */
+ if ((az->ar->alignment & RGN_SPLIT_PREV) && az->ar->prev &&
+ !is_split_edge(RGN_ALIGN_ENUM_FROM_MASK(az->ar->alignment), az->edge)) {
+ rmd->ar = az->ar->prev;
+ }
+ else {
+ rmd->ar = az->ar;
+ }
rmd->sa = sad->sa1;
rmd->edge = az->edge;
rmd->origx = event->x;