Search by short ship name in fit browser lite as well

This commit is contained in:
DarkPhoenix
2019-08-01 11:26:02 +03:00
parent 61836dbb83
commit fc2d7cf7b8
2 changed files with 6 additions and 2 deletions

View File

@@ -19,7 +19,7 @@ class AddBrowsedFits(ContextMenuUnconditional):
return 'Add Fit...'
def activate(self, callingWindow, fullContext, i):
from gui.builtinViews.fitBrowserLite import FitBrowserLiteDialog
from gui.fitBrowserLite import FitBrowserLiteDialog
titles = {
'projected': 'Add Projected Fits',
'commandView': 'Add Command Fits',

View File

@@ -72,7 +72,11 @@ class FitBrowserLiteDialog(wx.Dialog):
def isMatch(fit, searchTokens):
for token in searchTokens:
if token not in fit.name.lower() and token not in fit.shipName.lower():
if (
token not in fit.name.lower() and
token not in fit.shipName.lower() and
token not in fit.shipNameShort.lower()
):
return False
return True