From c6e0d0580782706e8f429321440c3ad56af11f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Br=C3=BCbach=2C=20Lukas?= Date: Sun, 30 Nov 2025 19:41:10 +0100 Subject: [PATCH] [DeckEditor] Expand DeckDock TreeView when adding card through deck editor --- .../widgets/deck_editor/deck_editor_deck_dock_widget.h | 2 +- .../src/interface/widgets/tabs/abstract_tab_deck_editor.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.h b/cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.h index 852ce7164..37891072d 100644 --- a/cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.h +++ b/cockatrice/src/interface/widgets/deck_editor/deck_editor_deck_dock_widget.h @@ -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 diff --git a/cockatrice/src/interface/widgets/tabs/abstract_tab_deck_editor.cpp b/cockatrice/src/interface/widgets/tabs/abstract_tab_deck_editor.cpp index 6d05e656d..6178e3ec9 100644 --- a/cockatrice/src/interface/widgets/tabs/abstract_tab_deck_editor.cpp +++ b/cockatrice/src/interface/widgets/tabs/abstract_tab_deck_editor.cpp @@ -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());