fix: don't show conceded players, fix: compute multicolumn layout correctly when dealing with odd number of players

This commit is contained in:
unknown 2011-09-12 16:32:55 +02:00
parent b001421cfe
commit 3ed26e11ae
4 changed files with 10 additions and 7 deletions

View file

@ -64,7 +64,6 @@ void GameScene::rearrange()
const int playersCount = playersPlaying.size();
const int columns = playersCount < settingsCache->getMinPlayersForMultiColumnLayout() ? 1 : 2;
const int rows = ceil((qreal) playersCount / columns);
qreal sceneHeight = 0, sceneWidth = -playerAreaSpacing;
QList<int> columnWidth;
int firstPlayerOfColumn = firstPlayer;
@ -72,7 +71,7 @@ void GameScene::rearrange()
playersByColumn.append(QList<Player *>());
columnWidth.append(0);
qreal thisColumnHeight = -playerAreaSpacing;
const int rowsInColumn = rows - (playersCount % columns);
const int rowsInColumn = rows - (playersCount % columns) * col; // only correct for max. 2 cols
for (int j = 0; j < rowsInColumn; ++j) {
Player *player = playersPlaying[(firstPlayerOfColumn + j) % playersCount];
if (col == 0)