[Bf-blender-cvs] [b1f1c8c33fa] master: Fix: region toggle operator being able to toggle regions it shouldn't

Julian Eisel noreply at git.blender.org
Tue Oct 8 11:35:32 CEST 2019


Commit: b1f1c8c33fabb3c03b90d101c8f9df2b5abe8740
Author: Julian Eisel
Date:   Tue Oct 8 10:50:43 2019 +0200
Branches: master
https://developer.blender.org/rBb1f1c8c33fabb3c03b90d101c8f9df2b5abe8740

Fix: region toggle operator being able to toggle regions it shouldn't

Only regions with alignment set should be toggle-able. If this is not
set, then the region is likely either a main region, or entirely hidden
by the user (not just collapsed).

===================================================================

M	source/blender/editors/screen/screen_ops.c

===================================================================

diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 866144c272d..cc1f53eabde 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -3946,7 +3946,7 @@ static int region_toggle_exec(bContext *C, wmOperator *op)
     region = CTX_wm_region(C);
   }
 
-  if (region) {
+  if (region && (region->alignment != RGN_ALIGN_NONE)) {
     ED_region_toggle_hidden(C, region);
   }
   ED_region_tag_redraw(region);



More information about the Bf-blender-cvs mailing list