diff options
author | Harley Acheson <harley.acheson@gmail.com> | 2019-05-19 03:09:45 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2019-05-19 03:09:45 +0300 |
commit | 06c4139a68330dc74ec4e87f6b5c5f2b7a25ad74 (patch) | |
tree | 04d88fdcdf5fab73dfb4fd5d8d3144455775edfc /source/blender/editors/space_outliner/space_outliner.c | |
parent | 5f2578f32fdd3cf49d5299f0553dc756e4f670cf (diff) |
UI: Remove Hover Highlight When Outliner Loses Focus
This patch removes the hover highlight that can sometimes remain after moving out of the Outliner space
Differential Revision: https://developer.blender.org/D4822
Reviewed by Brecht Van Lommel
Diffstat (limited to 'source/blender/editors/space_outliner/space_outliner.c')
-rw-r--r-- | source/blender/editors/space_outliner/space_outliner.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 4c591a61f67..313e6014b88 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -384,6 +384,14 @@ static void outliner_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, } } +static void outliner_deactivate(struct ScrArea *sa) +{ + /* Remove hover highlights */ + SpaceOutliner *soops = sa->spacedata.first; + outliner_flag_set(&soops->tree, TSE_HIGHLIGHTED, false); + ED_region_tag_redraw(BKE_area_find_region_type(sa, RGN_TYPE_WINDOW)); +} + /* only called once, from space_api/spacetypes.c */ void ED_spacetype_outliner(void) { @@ -401,6 +409,7 @@ void ED_spacetype_outliner(void) st->keymap = outliner_keymap; st->dropboxes = outliner_dropboxes; st->id_remap = outliner_id_remap; + st->deactivate = outliner_deactivate; /* regions: main window */ art = MEM_callocN(sizeof(ARegionType), "spacetype outliner region"); |