Enable selecting star search results with duplicate names

Systems with shared names should be unique to imgui in selection menu
Fixes #5188
master
Karl F 2021-05-17 13:49:14 +02:00
parent 0c84df0211
commit 6ade7d66ce
1 changed files with 2 additions and 2 deletions

View File

@ -313,9 +313,9 @@ local function drawSearchResults(systempaths)
table.sort(data, function(a,b)
return a.path ~= b.path and (not a.path:IsSameSystem(b.path)) and a.distance < b.distance
end)
for _,item in pairs(data) do
for i, item in pairs(data) do
local system = item.path:GetStarSystem()
if ui.selectable(system.name, false, {}) then
if ui.selectable(system.name .. "##" .. i, false, {}) then
sectorView:SwitchToPath(item.path)
end
ui.sameLine()