diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 56ba6403596..1b2adfd28c6 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -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); @@ -787,13 +787,18 @@ static void rna_Space_view2d_sync_update(Main *UNUSED(bmain), static void rna_GPencil_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) { + bool changed = false; /* need set all caches as dirty to recalculate onion skinning */ for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { if (ob->type == OB_GPENCIL) { - DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); + bGPdata *gpd = (bGPdata *)ob->data; + DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY); + changed = true; } } - WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL); + if (changed) { + WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL); + } } /* Space 3D View */ @@ -1105,7 +1110,7 @@ static const EnumPropertyItem *rna_View3DShading_color_type_itemf(bContext *UNUS } else { /* Solid mode, or lookdev mode for workbench engine. */ - r_free = false; + *r_free = false; return rna_enum_shading_color_type_items; } } |