mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 09:05:10 -07:00
[DeckEditor] Restore auto-scroll when adding cards
This commit is contained in:
parent
7b39cf98d5
commit
10d916b575
1 changed files with 4 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue