mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2024-11-17 07:48:27 +01:00
The history now shows the "Player" column only in FreeGame mode.
It doesn't really make sense (or it is useless) in the other modes.
This commit is contained in:
parent
7fd8a245f8
commit
fbb34d795c
2 changed files with 8 additions and 5 deletions
|
@ -34,6 +34,7 @@
|
|||
#include "history.h"
|
||||
#include "turn.h"
|
||||
#include "move.h"
|
||||
#include "game_params.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -228,12 +229,14 @@ void HistoryTabWidget::setGame(const PublicGame *iGame)
|
|||
if (m_game == NULL)
|
||||
{
|
||||
// Tell the remaining tab that there is no more history to display
|
||||
m_gameHistoryWidget->setHistory(NULL);
|
||||
m_gameHistoryWidget->setHistory(NULL, NULL, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Refresh the Game tab
|
||||
m_gameHistoryWidget->setHistory(&m_game->getHistory(), m_game);
|
||||
const bool showPlayerColumn =
|
||||
m_game->getParams().getMode() == GameParams::kFREEGAME;
|
||||
m_gameHistoryWidget->setHistory(&m_game->getHistory(), m_game, !showPlayerColumn);
|
||||
QObject::connect(this, SIGNAL(refreshSignal()),
|
||||
m_gameHistoryWidget, SLOT(refresh()));
|
||||
QObject::connect(m_gameHistoryWidget, SIGNAL(requestDefinition(QString)),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*****************************************************************************
|
||||
* Eliot
|
||||
* Copyright (C) 2008 Olivier Teulière
|
||||
* Copyright (C) 2008-2012 Olivier Teulière
|
||||
* Authors: Olivier Teulière <ipkiss @@ gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -39,8 +39,8 @@ public:
|
|||
explicit HistoryWidget(QWidget *parent = 0);
|
||||
|
||||
void setHistory(const History *iHistory,
|
||||
const PublicGame *iGame = NULL,
|
||||
bool iIsForPlayer = false);
|
||||
const PublicGame *iGame,
|
||||
bool iIsForPlayer);
|
||||
|
||||
public slots:
|
||||
void refresh();
|
||||
|
|
Loading…
Reference in a new issue