Skip to content

Commit

Permalink
Refactor selection logic to handle multiple system nodes and links (#319
Browse files Browse the repository at this point in the history
)

* Refactor selection logic to handle multiple system nodes and links
* Remove unnecessary return statement in Overview component
  • Loading branch information
pfh59 authored Nov 24, 2024
1 parent e4cf523 commit 6fdf6ad
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/WHMapper/Pages/Mapper/Map/Overview.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,22 @@ await InvokeAsync(() =>
_selectedSystemNodes = selectedModels.OfType<EveSystemNodeModel>().ToList();
_selectedSystemLinks = selectedModels.OfType<EveSystemLinkModel>().ToList();
if (item is EveSystemNodeModel node)
if(_selectedSystemNodes.Count>1 || _selectedSystemLinks.Count>1)
{
HandleNodeSelection(node);
SelectedSystemNode = null;
SelectedSystemLink = null;
}
else if (item is EveSystemLinkModel link)
{
HandleLinkSelection(link);
else
{
if (item is EveSystemNodeModel node)
{
HandleNodeSelection(node);
}
else if (item is EveSystemLinkModel link)
{
HandleLinkSelection(link);
}
}
});
}
Expand Down

0 comments on commit 6fdf6ad

Please sign in to comment.