mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-26 14:38:34 +01:00
fixed tooltips removing themselves from a nonexistant system if an element gets removed
This commit is contained in:
parent
b0aab6fe60
commit
e7c7a5bbc2
2 changed files with 5 additions and 2 deletions
|
@ -17,7 +17,10 @@ namespace MLEM.Ui.Elements {
|
||||||
|
|
||||||
if (elementToHover != null) {
|
if (elementToHover != null) {
|
||||||
elementToHover.OnMouseEnter += element => element.System.Add(element.GetType().Name + "Tooltip", this).CanSelectContent = false;
|
elementToHover.OnMouseEnter += element => element.System.Add(element.GetType().Name + "Tooltip", this).CanSelectContent = false;
|
||||||
elementToHover.OnMouseExit += element => element.System.Remove(element.GetType().Name + "Tooltip");
|
elementToHover.OnMouseExit += element => {
|
||||||
|
if (this.System != null)
|
||||||
|
this.System.Remove(element.GetType().Name + "Tooltip");
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<PackageProjectUrl>https://github.com/Ellpeck/MLEM</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/Ellpeck/MLEM</PackageProjectUrl>
|
||||||
<RepositoryUrl>https://github.com/Ellpeck/MLEM</RepositoryUrl>
|
<RepositoryUrl>https://github.com/Ellpeck/MLEM</RepositoryUrl>
|
||||||
<PackageLicenseUrl>https://github.com/Ellpeck/MLEM/blob/master/LICENSE</PackageLicenseUrl>
|
<PackageLicenseUrl>https://github.com/Ellpeck/MLEM/blob/master/LICENSE</PackageLicenseUrl>
|
||||||
<Version>1.1.5</Version>
|
<Version>1.1.6</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
Loading…
Reference in a new issue