Skip to content

Commit

Permalink
Moved market instance creation down to save some time if we're not ev…
Browse files Browse the repository at this point in the history
…en going to search
  • Loading branch information
Ebag333 committed Aug 11, 2016
1 parent 7a715fc commit 8da8920
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gui/propertyEditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
class AttributeEditor( wx.Frame ):

def __init__( self, parent ):
logger.debug('Initialize propertyEditor.py')
wx.Frame.__init__(self, parent, wx.ID_ANY, title="Attribute Editor", pos=wx.DefaultPosition,
size=wx.Size(650, 600), style=wx.DEFAULT_FRAME_STYLE|wx.FRAME_FLOAT_ON_PARENT|wx.TAB_TRAVERSAL)

Expand Down Expand Up @@ -180,7 +181,7 @@ def updateItems(self, updateDisplay=False):
self.update(self.things)

def scheduleSearch(self, event=None):
sMkt = service.Market.getInstance()
logger.debug('Initiating search')

search = self.searchBox.GetLineText(0)
# Make sure we do not count wildcard as search symbol
Expand All @@ -190,9 +191,11 @@ def scheduleSearch(self, event=None):
self.clearSearch()
return

sMkt = service.Market.getInstance()
sMkt.searchItems(search, self.populateSearch, False)

def populateSearch(self, items):
logger.debug('Populating Search')
self.items = list(items)
self.update(items)

Expand Down

0 comments on commit 8da8920

Please sign in to comment.