diff options
author | Julian Eisel <julian@blender.org> | 2022-05-25 13:53:07 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-05-25 21:16:17 +0300 |
commit | f1df685f570bbd248b0356fdb4afda1b181d6a09 (patch) | |
tree | 9d3ae9b30bd43550059f69d6c2b3b9978ca81d5e /source/blender/editors/space_outliner/tree/tree_display_libraries.cc | |
parent | 1a516bb714bf2892d9d10dc83cc1215a41a3d1ea (diff) |
Outliner: Refactor element warning and mode column querying
Uses a inheritance based approach for querying warning of tree elements
and the mode column support of display modes.
For the warnings, tree elements can override the
`AbstractTreeElement::getWarning()` method and return a warning string.
The UI will draw the warning column with warning icons. This makes the
warning column more generalized and easier to extend to more use-cases.
E.g. library override elements will use this after a followup commit.
To support mode toggles a display mode can now just return true in the
`AbstractTreeDisplay::supportsModeColumn()` method. This makes it
trivial to add mode columns to other display modes, and less error prone
because there's no need to hunt down a bunch of display mode checks in
different places.
Diffstat (limited to 'source/blender/editors/space_outliner/tree/tree_display_libraries.cc')
-rw-r--r-- | source/blender/editors/space_outliner/tree/tree_display_libraries.cc | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/tree/tree_display_libraries.cc b/source/blender/editors/space_outliner/tree/tree_display_libraries.cc index 476bbdb63ae..46a89f17687 100644 --- a/source/blender/editors/space_outliner/tree/tree_display_libraries.cc +++ b/source/blender/editors/space_outliner/tree/tree_display_libraries.cc @@ -136,9 +136,6 @@ TreeElement *TreeDisplayLibraries::add_library_contents(Main &mainvar, ListBase tenlib = outliner_add_element(&space_outliner_, &lb, &mainvar, nullptr, TSE_ID_BASE, 0); tenlib->name = IFACE_("Current File"); } - if (tenlib->flag & TE_HAS_WARNING) { - has_warnings = true; - } } /* Create data-block list parent element on demand. */ |