# UMG brush color getting stuck after reparenting

**URL:** <https://forums.unrealengine.com/t/umg-brush-color-getting-stuck-after-reparenting/381372>\
**Category:** UI\
**Tags:** fyi, unreal-engine, Rendering, Blueprint, question, UMG\
**Created:** [January 9, 2017, 7:06pm UTC](https://forums.unrealengine.com/t/umg-brush-color-getting-stuck-after-reparenting/381372 "2017-01-09T19:06:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Answers.Archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Answers.Archive](https://forums.unrealengine.com/u/Answers.Archive)\
**Post date:** [January 9, 2017, 7:06pm UTC](https://forums.unrealengine.com/t/umg-brush-color-getting-stuck-after-reparenting/381372/1 "2017-01-09T19:06:24Z")

</div>

I have the following UMG hierarchy:

- Two uniform grid panels.
- The first grid panel contains a custom button that has an image inside of a border like this:

![121400-itemhierarchy.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/7/2/d72faae73bc9ea3713ae3cf3e5782290d536289b.png)

- When the button is clicked, it is removed from the first grid panel and added as a child to the second.

The problem I’m seeing is that after the button is moved to the second grid panel the brush color of the border gets stuck forever and there is no way to clear it. I have some blueprints that are changing the brush color when hovered/unhovered like the following:

![121399-hoverbp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/1/5/b15991bfe45507b0e6b2a7a6ae9b9126184c89d5.png)

It’s just tinting it with a slightly red color when hovered, and then after the click transfers it to the other grid panel it’s impossible to get rid of that red tint no matter what I do to change the brush color. Is there something I’m missing here? Do I need to do some special invalidation or something after reparenting?

---

<div class="post-metadata">

**Author:** ![Answers.Archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Answers.Archive](https://forums.unrealengine.com/u/Answers.Archive)\
**Post date:** [January 9, 2017, 7:06pm UTC](https://forums.unrealengine.com/t/umg-brush-color-getting-stuck-after-reparenting/381372/2 "2017-01-09T19:06:31Z")

</div>

Hi Justin,

I’ve been digging in to this, and filed bug report **[UE-39106](https://issues.unrealengine.com/issue/UE-39106).** It looks like what’s happening is that when we reparent your ItemSlot\_UI Userwidget, the slate resources for its hierarchy are supposed to be release and recreated. We release them, but we still have a reference to them since the instigating OnClick event came from the slate widget. We see that slate widgets already exist and end up pointing the widgets in the hierarchy back to the now released resources instead of rebuilding them. This means the UWidgets now don’t have their underlying SWidgets, and many of the widget nodes wont work.

I’m working on a proper fix, but in the meantime you can add a Delay(0) node between your click event and reparenting of the widget. This will defer the reparenting so that there are no longer any references to the slate widgets. I’ll post back here once I have a better solution for you.

Best,

Cody

---

<div class="post-metadata">

**Author:** ![Answers.Archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Answers.Archive](https://forums.unrealengine.com/u/Answers.Archive)\
**Post date:** [January 9, 2017, 7:06pm UTC](https://forums.unrealengine.com/t/umg-brush-color-getting-stuck-after-reparenting/381372/3 "2017-01-09T19:06:32Z")

</div>

Thanks Cody! That did the trick.

---

<div class="post-metadata">

**Author:** ![Answers.Archive](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Answers.Archive](https://forums.unrealengine.com/u/Answers.Archive)\
**Post date:** [January 9, 2017, 7:06pm UTC](https://forums.unrealengine.com/t/umg-brush-color-getting-stuck-after-reparenting/381372/4 "2017-01-09T19:06:33Z")

</div>

Hi Justin,

I checked in CL# 3213603 which should fix this issue. Let me know if you integrate it and run into any unexpected problems.

Best,

Cody
