mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 04:53:29 +01:00
Fixed elements not being deselected when removed through RemoveChild
This commit is contained in:
parent
be26a2ebc2
commit
783da33107
2 changed files with 3 additions and 0 deletions
|
@ -20,6 +20,7 @@ Additions
|
|||
Fixes
|
||||
- Fixed auto-nav tooltip displaying on the selected element even when not in auto-nav mode
|
||||
- Fixed radio buttons not unchecking all other radio buttons with the same root element
|
||||
- Fixed elements not being deselected when removed through RemoveChild
|
||||
|
||||
## 5.3.0
|
||||
### MLEM
|
||||
|
|
|
@ -485,6 +485,8 @@ namespace MLEM.Ui.Elements {
|
|||
/// <param name="element">The child element to remove</param>
|
||||
public virtual void RemoveChild(Element element) {
|
||||
this.children.Remove(element);
|
||||
if (this.Root?.SelectedElement == element)
|
||||
this.Root.SelectElement(null);
|
||||
// set area dirty here so that a dirty call is made
|
||||
// upwards to us if the element is auto-positioned
|
||||
element.SetAreaDirty();
|
||||
|
|
Loading…
Reference in a new issue