mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-21 07:17:53 +01:00
Fix exception when deleting multiple mods at once.
This commit is contained in:
parent
cf4b6c2ce8
commit
e1bbc48779
2 changed files with 12 additions and 3 deletions
2
Luna
2
Luna
|
|
@ -1 +1 @@
|
||||||
Subproject commit 616d66b1d384588c23a3b5725ad1330037ce6987
|
Subproject commit 59967db0b6fba6e85d04d91e91ed07a35cb42d69
|
||||||
|
|
@ -72,8 +72,17 @@ public sealed class ModFileSystem : BaseFileSystem, IDisposable, IRequiredServic
|
||||||
Selection.Select(data);
|
Selection.Select(data);
|
||||||
break;
|
break;
|
||||||
case ModPathChangeType.Deleted:
|
case ModPathChangeType.Deleted:
|
||||||
if (arguments.Mod.Node is not null)
|
if (arguments.Mod.Node is { } node)
|
||||||
Delete(arguments.Mod.Node);
|
{
|
||||||
|
// Unselect all because of event spaghetti.
|
||||||
|
// If two nodes are selected and one is deleted, the remaining one
|
||||||
|
// will try to fetch settings down the line and possibly break.
|
||||||
|
// Untangling the events is hard.
|
||||||
|
if (node.Selected)
|
||||||
|
Selection.UnselectAll();
|
||||||
|
Delete(node);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case ModPathChangeType.Reloaded:
|
case ModPathChangeType.Reloaded:
|
||||||
// Nothing
|
// Nothing
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue