mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-12 07:40:30 -08:00
Fix opening replays
This commit is contained in:
@@ -65,8 +65,8 @@
|
|||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
|
TabGame::TabGame(TabSupervisor *_tabSupervisor, UserListProxy *_userListProxy, GameReplay *_replay)
|
||||||
: Tab(_tabSupervisor), secondsElapsed(0), hostId(-1), localPlayerId(-1),
|
: Tab(_tabSupervisor), userListProxy(_userListProxy), secondsElapsed(0), hostId(-1), localPlayerId(-1),
|
||||||
isLocalGame(_tabSupervisor->getIsLocalGame()), spectator(true), judge(false), gameStateKnown(false),
|
isLocalGame(_tabSupervisor->getIsLocalGame()), spectator(true), judge(false), gameStateKnown(false),
|
||||||
resuming(false), currentPhase(-1), activeCard(nullptr), gameClosed(false), replay(_replay), currentReplayStep(0),
|
resuming(false), currentPhase(-1), activeCard(nullptr), gameClosed(false), replay(_replay), currentReplayStep(0),
|
||||||
sayLabel(nullptr), sayEdit(nullptr)
|
sayLabel(nullptr), sayEdit(nullptr)
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ public:
|
|||||||
QList<AbstractClient *> &_clients,
|
QList<AbstractClient *> &_clients,
|
||||||
const Event_GameJoined &event,
|
const Event_GameJoined &event,
|
||||||
const QMap<int, QString> &_roomGameTypes);
|
const QMap<int, QString> &_roomGameTypes);
|
||||||
TabGame(TabSupervisor *_tabSupervisor, GameReplay *replay);
|
TabGame(TabSupervisor *_tabSupervisor, UserListProxy *_userListProxy, GameReplay *replay);
|
||||||
~TabGame() override;
|
~TabGame() override;
|
||||||
void retranslateUi() override;
|
void retranslateUi() override;
|
||||||
void updatePlayerListDockTitle();
|
void updatePlayerListDockTitle();
|
||||||
|
|||||||
@@ -648,7 +648,7 @@ void TabSupervisor::roomLeft(TabRoom *tab)
|
|||||||
|
|
||||||
void TabSupervisor::openReplay(GameReplay *replay)
|
void TabSupervisor::openReplay(GameReplay *replay)
|
||||||
{
|
{
|
||||||
auto *replayTab = new TabGame(this, replay);
|
auto *replayTab = new TabGame(this, userListManager, replay);
|
||||||
connect(replayTab, &TabGame::gameClosing, this, &TabSupervisor::replayLeft);
|
connect(replayTab, &TabGame::gameClosing, this, &TabSupervisor::replayLeft);
|
||||||
myAddTab(replayTab);
|
myAddTab(replayTab);
|
||||||
replayTabs.append(replayTab);
|
replayTabs.append(replayTab);
|
||||||
|
|||||||
Reference in New Issue
Block a user