1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-26 06:28:35 +01:00

Fixed auto-nav tooltip displaying on the selected element even when not in auto-nav mode

This commit is contained in:
Ell 2022-04-09 22:00:21 +02:00
parent 62d2b28ec0
commit 902391d278
2 changed files with 5 additions and 1 deletions

View file

@ -10,6 +10,10 @@ Jump to version:
## 5.4.0 (Unreleased) ## 5.4.0 (Unreleased)
### MLEM.Ui
Fixes
- Fixed auto-nav tooltip displaying on the selected element even when not in auto-nav mode
## 5.3.0 ## 5.3.0
### MLEM ### MLEM
Additions Additions

View file

@ -171,7 +171,7 @@ namespace MLEM.Ui.Elements {
elementToHover.OnMouseEnter += e => this.Display(e.System, $"{e.GetType().Name}Tooltip"); elementToHover.OnMouseEnter += e => this.Display(e.System, $"{e.GetType().Name}Tooltip");
elementToHover.OnMouseExit += e => this.Remove(); elementToHover.OnMouseExit += e => this.Remove();
elementToHover.OnSelected += e => { elementToHover.OnSelected += e => {
if (this.DisplayInAutoNavMode) { if (this.DisplayInAutoNavMode && e.Controls.IsAutoNavMode) {
this.snapElement = e; this.snapElement = e;
this.Display(e.System, $"{e.GetType().Name}Tooltip"); this.Display(e.System, $"{e.GetType().Name}Tooltip");
} }