mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-21 00:55:09 -07:00
[DeckEditor] Restore auto-scroll when adding cards (#7317)
Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
51365960fe
commit
59dd052143
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