From 8e6500f6dd72ed5af08d1fb91183d4c2438ec012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Teuli=C3=A8re?= Date: Mon, 14 Jan 2013 01:08:22 +0100 Subject: [PATCH] Stats: hide some information in topping mode --- qt/stats_widget.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qt/stats_widget.cpp b/qt/stats_widget.cpp index abee6db..d128089 100644 --- a/qt/stats_widget.cpp +++ b/qt/stats_widget.cpp @@ -162,10 +162,14 @@ void StatsWidget::refresh() setModelSize(nbPlayers + 1, histSize + 10); // Some fields are displayed only in some cases + const bool isTraining = m_game != NULL && + m_game->getParams().getMode() == GameParams::kTRAINING; const bool isArbit = m_game != NULL && m_game->getParams().getMode() == GameParams::kARBITRATION; const bool isFreeGame = m_game != NULL && m_game->getParams().getMode() == GameParams::kFREEGAME; + const bool isTopping = m_game != NULL && + m_game->getParams().getMode() == GameParams::kTOPPING; const bool canHaveSolos = m_game != NULL && m_game->getParams().getMode() == GameParams::kDUPLICATE && Settings::Instance().getInt("duplicate.solo-players") <= (int)m_game->getNbPlayers(); @@ -196,14 +200,17 @@ void StatsWidget::refresh() setModelHeader(col++, _q("End game points"), false); setSectionHidden(col, !isArbit && !canHaveSolos); setModelHeader(col++, _q("Solo points"), false); - setSectionHidden(col, !isArbit); + setSectionHidden(col, !isArbit && !isTopping); setModelHeader(col++, _q("Penalties"), false); setSectionHidden(col, !isArbit); setModelHeader(col++, _q("Warnings"), false); setModelHeader(col++, _q("Total"), false); + setSectionHidden(col, isTopping); setModelHeader(col++, _q("Diff"), false); + setSectionHidden(col, isTopping); setModelHeader(col++, _q("Game %"), false); + setSectionHidden(col, isTraining || isTopping); setModelHeader(col++, _q("Ranking"), false); // Define the header for the Game pseudo-player