[DeckEditor] Restore auto-scroll when adding cards

This commit is contained in:
Lukas Brübach 2026-09-18 20:10:13 +02:00
parent 7b39cf98d5
commit 10d916b575

View file

@ -520,8 +520,11 @@ void DeckEditorDeckDockWidget::syncBannerCardComboBoxSelectionWithDeck()
void DeckEditorDeckDockWidget::setSelectedIndex(const QModelIndex &newCardIndex, bool preserveWidgetFocus)
{
const QModelIndex proxyIndex = proxy->mapFromSource(newCardIndex);
deckView->clearSelection();
deckView->setCurrentIndex(newCardIndex);
deckView->setCurrentIndex(proxyIndex);
deckView->scrollTo(proxyIndex);
recursiveExpand(newCardIndex);
if (!preserveWidgetFocus) {