[DeckEditor] Expand DeckDock TreeView when adding card through deck editor

This commit is contained in:
Brübach, Lukas 2025-11-30 19:41:10 +01:00
parent 3ff2df2796
commit c6e0d05807
2 changed files with 2 additions and 1 deletions

View file

@ -69,6 +69,7 @@ public slots:
void actSwapCard();
void actRemoveCard();
void offsetCountAtIndex(const QModelIndex &idx, int offset);
void expandAll();
signals:
void nameChanged();
@ -117,7 +118,6 @@ private slots:
void updateShowBannerCardComboBox(bool visible);
void updateShowTagsWidget(bool visible);
void syncBannerCardComboBoxSelectionWithDeck();
void expandAll();
};
#endif // DECK_EDITOR_DECK_DOCK_WIDGET_H

View file

@ -155,6 +155,7 @@ void AbstractTabDeckEditor::addCardHelper(const ExactCard &card, QString zoneNam
QModelIndex newCardIndex = deckDockWidget->deckModel->addCard(card, zoneName);
deckDockWidget->deckView->clearSelection();
deckDockWidget->deckView->setCurrentIndex(newCardIndex);
deckDockWidget->expandAll();
setModified(true);
databaseDisplayDockWidget->searchEdit->setSelection(0, databaseDisplayDockWidget->searchEdit->text().length());