Fix T70522: Sidebars in Clip Editor work incorrectly in Dopesheet mode
authorJulian Eisel <eiseljulian@gmail.com>
Tue, 8 Oct 2019 08:29:27 +0000 (10:29 +0200)
committerJulian Eisel <eiseljulian@gmail.com>
Tue, 8 Oct 2019 08:33:48 +0000 (10:33 +0200)
Actually, in Dopesheet mode, the regions shouldn't be toggle-able at
all. For the user they should appear to not exist.
Previously the Movie Clip Editor archieved this by setting the region
alignments to NONE, which this restores.

Introduced in 6aef124e7d28.

source/blender/makesrna/intern/rna_space.c

index 52aca9bdea5578810555b5428a5ab75631d0d60a..01532d8568b9cb00dce1fc98ec108eefdfa2ab34 100644 (file)
@@ -589,7 +589,7 @@ static void rna_Space_bool_from_region_flag_set_by_type(PointerRNA *ptr,
 {
   ScrArea *sa = rna_area_from_space(ptr);
   ARegion *ar = BKE_area_find_region_type(sa, region_type);
-  if (ar) {
+  if (ar && (ar->alignment != RGN_ALIGN_NONE)) {
     SET_FLAG_FROM_TEST(ar->flag, value, region_flag);
   }
   ED_region_tag_redraw(ar);