[DeckListModel] Refactor api for offset count (#6454)

This commit is contained in:
RickyRister 2025-12-29 08:19:03 -08:00 committed by GitHub
parent 96c82a0377
commit 296866a675
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 30 deletions

View file

@ -831,11 +831,8 @@ void DeckEditorDeckDockWidget::offsetCountAtIndex(const QModelIndex &idx, bool i
emit requestDeckHistorySave(reason);
if (isIncrement) {
deckModel->incrementAmountAtIndex(sourceIndex);
} else {
deckModel->decrementAmountAtIndex(sourceIndex);
}
int offset = isIncrement ? 1 : -1;
deckModel->offsetCountAtIndex(sourceIndex, offset);
emit deckModified();
}