From 8639630ff076071f6f187642c89d5b4f77b8067d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Fri, 13 Jun 2025 12:12:56 +0200 Subject: [PATCH] Cast to abstract tab deck editor instead of regular. --- .../deck_preview_deck_tags_display_widget.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cockatrice/src/client/ui/widgets/visual_deck_storage/deck_preview/deck_preview_deck_tags_display_widget.cpp b/cockatrice/src/client/ui/widgets/visual_deck_storage/deck_preview/deck_preview_deck_tags_display_widget.cpp index d446589d0..b77ebe7f7 100644 --- a/cockatrice/src/client/ui/widgets/visual_deck_storage/deck_preview/deck_preview_deck_tags_display_widget.cpp +++ b/cockatrice/src/client/ui/widgets/visual_deck_storage/deck_preview/deck_preview_deck_tags_display_widget.cpp @@ -154,16 +154,17 @@ void DeckPreviewDeckTagsDisplayWidget::openTagEditDlg() } } } else if (parentWidget()) { - // If we're the child of a TabDeckEditor, we are buried under a ton of childWidgets in the DeckInfoDock. + // If we're the child of an AbstractTabDeckEditor, we are buried under a ton of childWidgets in the + // DeckInfoDock. QWidget *currentParent = parentWidget(); while (currentParent) { - if (qobject_cast(currentParent)) { + if (qobject_cast(currentParent)) { break; } currentParent = currentParent->parentWidget(); } - if (qobject_cast(currentParent)) { - auto *deckEditor = qobject_cast(currentParent); + if (qobject_cast(currentParent)) { + auto *deckEditor = qobject_cast(currentParent); QStringList knownTags; QStringList allFiles = getAllFiles(SettingsCache::instance().getDeckPath()); DeckLoader loader;