From 5c8df0a742cce10fcddc4dab9472b9ba1553c676 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Wed, 15 May 2019 08:14:00 -0300 Subject: Fix default open outliner restrict columns Regression introduced on 777a546c0c7. --- source/blender/blenloader/intern/versioning_280.c | 2 +- source/blender/editors/space_outliner/outliner_utils.c | 7 +++---- source/blender/editors/space_outliner/space_outliner.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'source') diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 4ca8c24dca0..9d8fa2d06d0 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -3407,7 +3407,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } SpaceOutliner *so = (SpaceOutliner *)sl; so->filter &= ~SO_FLAG_UNUSED_1; - so->show_restrict_flags = SO_RESTRICT_ENABLE | SO_RESTRICT_SELECT | SO_RESTRICT_VIEWPORT; + so->show_restrict_flags = SO_RESTRICT_ENABLE | SO_RESTRICT_SELECT | SO_RESTRICT_HIDE; } } } diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c index 9f99c658bd9..f57dce97b38 100644 --- a/source/blender/editors/space_outliner/outliner_utils.c +++ b/source/blender/editors/space_outliner/outliner_utils.c @@ -270,6 +270,7 @@ float outliner_restrict_columns_width(const SpaceOutliner *soops) switch (soops->outlinevis) { case SO_DATA_API: case SO_SEQUENCE: + case SO_LIBRARIES: return 0.0f; case SO_ID_ORPHANS: num_columns = 3; @@ -286,18 +287,16 @@ float outliner_restrict_columns_width(const SpaceOutliner *soops) if (soops->show_restrict_flags & SO_RESTRICT_SELECT) { num_columns++; } - if (soops->show_restrict_flags & SO_RESTRICT_VIEWPORT) { + if (soops->show_restrict_flags & SO_RESTRICT_HIDE) { num_columns++; } - if (soops->show_restrict_flags & SO_RESTRICT_HIDE) { + if (soops->show_restrict_flags & SO_RESTRICT_VIEWPORT) { num_columns++; } if (soops->show_restrict_flags & SO_RESTRICT_RENDER) { num_columns++; } break; - case SO_LIBRARIES: - return 0.0f; } return (num_columns * UI_UNIT_X + V2D_SCROLL_WIDTH); } diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index e048814df9b..6634edfebee 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -302,7 +302,7 @@ static SpaceLink *outliner_new(const ScrArea *UNUSED(area), const Scene *UNUSED( soutliner = MEM_callocN(sizeof(SpaceOutliner), "initoutliner"); soutliner->spacetype = SPACE_OUTLINER; soutliner->filter_id_type = ID_GR; - soutliner->show_restrict_flags = SO_RESTRICT_ENABLE | SO_RESTRICT_SELECT | SO_RESTRICT_VIEWPORT; + soutliner->show_restrict_flags = SO_RESTRICT_ENABLE | SO_RESTRICT_SELECT | SO_RESTRICT_HIDE; /* header */ ar = MEM_callocN(sizeof(ARegion), "header for outliner"); -- cgit v1.2.3