mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 20:13:56 -07:00
Enable buttons for current game when receiving server response (#4737)
* Enable buttons for current game when receiving server response Previously, upon joining a game, we were unconditionally re-enabling the "Join" button in the lobby, even if it was not enabled in the first place, causing #4698. This could also lead to issues where if the user selects a different game after joining (which they can do in case of e.g. network connectivity issues), the "Join as spectator" button could get incorrectly disabled. This fixes #4698 by re-enabling the buttons based on the state of the currently selected game at the time the response is received. This also avoids inconsistencies if a different game has been selected in between joining and receiving a response from the server. * Typo: enable gameButton in enableButtons The "create game" button was incorrectly being disabled in enableButtons whereas (as the name indicates) it should have been enabled * Remove misleading comment about race conditions
This commit is contained in:
parent
44d1ab348b
commit
00c9efe541
2 changed files with 44 additions and 14 deletions
|
|
@ -49,6 +49,9 @@ private:
|
|||
GameTypeMap gameTypeMap;
|
||||
|
||||
void updateTitle();
|
||||
void disableButtons();
|
||||
void enableButtons();
|
||||
void enableButtonsForIndex(const QModelIndex ¤t);
|
||||
|
||||
public:
|
||||
GameSelector(AbstractClient *_client,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue