bug: fix col auto-move for multiple cards

This commit is contained in:
ItsDrike 2024-12-04 18:01:55 +01:00
parent 9b4c43d603
commit 5696e244f2
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0

View file

@ -290,7 +290,7 @@ bool GameState::autoMoveColumnCard(int columnId, int cardIndex)
// This is a multiple cards move // This is a multiple cards move
qDebug() << "Attempting auto-move of column " << columnId << " card range " << cardIndex << " to " << columnStack.size() - 1; qDebug() << "Attempting auto-move of column " << columnId << " card range " << cardIndex << " to " << columnStack.size() - 1;
QList<PlayingCard*> selectedCards; QList<PlayingCard*> selectedCards;
for (int i = cardIndex; i < m_columns.size(); ++i) { for (int i = cardIndex; i < columnStack.size(); ++i) {
ColumnSlot* col = columnStack[i]; ColumnSlot* col = columnStack[i];
selectedCards.append(col->card()); selectedCards.append(col->card());
} }
@ -307,6 +307,8 @@ bool GameState::autoMoveColumnCard(int columnId, int cardIndex)
curSlot->deleteLater(); curSlot->deleteLater();
} }
ensureColumnRevealed(columnId);
emit columnsChanged(); emit columnsChanged();
return true; return true;
} }