Fix mucked cards' position update
When menu->reposition is called, only the HUD windows were moved to their new positions. The auxiliary windows used for mucked cards remained where they were at the time the HUD instance was created. This caused mucked cards to appear in wrong places after the poker table was moved. Split positioning code in Mucked.py to its own method. Now the same routine that moves HUD windows to their new places also invokes code to reposition auxiliary windows. Now the mucked cards are displayed at correct screen coordinates too.
This commit is contained in:
@@ -181,6 +181,11 @@ class Hud:
|
||||
for i, w in enumerate(self.stat_windows.itervalues()):
|
||||
(x, y) = loc[adj[i+1]]
|
||||
w.relocate(x, y)
|
||||
|
||||
# While we're at it, fix the positions of mucked cards too
|
||||
for aux in self.aux_windows:
|
||||
aux.update_card_positions()
|
||||
|
||||
return True
|
||||
|
||||
def on_button_press(self, widget, event):
|
||||
|
||||
Reference in New Issue
Block a user