Skip to content

Commit

Permalink
Fix resource selection dialog not disappearing
Browse files Browse the repository at this point in the history
Clicks to reproduce:
1) warehouse
2) buysell tab
3) any slot
4) any other tab of the warehouse tabs
5) deselect warehouse
The resource selection used to still be there, with no way to remove it
  • Loading branch information
totycro committed Apr 18, 2012
1 parent 64d9f80 commit b081d5d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions horizons/gui/tabs/buyselltab.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ def show(self):
self.refresh()
ExtScheduler().add_new_object(self.refresh, self, run_in=0.4, loops = -1)

def is_visible(self):
# this tab sometimes is made up an extra widget, so it must also be considered
# when checking for visibility
return super(BuySellTab, self).is_visible() or \
(self.resources is not None and self.resources.isVisible())

def _refresh_trade_history(self):
self.trade_history.removeAllChildren()
unused_rows = set(self.trade_history_widget_cache.keys())
Expand Down

0 comments on commit b081d5d

Please sign in to comment.