mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
[DeckListModel] Refactor api for offset count (#6454)
This commit is contained in:
parent
96c82a0377
commit
296866a675
4 changed files with 9 additions and 30 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue