Cast to abstract tab deck editor instead of regular.

This commit is contained in:
Lukas Brübach 2025-06-13 12:12:56 +02:00
parent a3e65a3388
commit 8639630ff0

View file

@ -154,16 +154,17 @@ void DeckPreviewDeckTagsDisplayWidget::openTagEditDlg()
} }
} }
} else if (parentWidget()) { } 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(); QWidget *currentParent = parentWidget();
while (currentParent) { while (currentParent) {
if (qobject_cast<TabDeckEditor *>(currentParent)) { if (qobject_cast<AbstractTabDeckEditor *>(currentParent)) {
break; break;
} }
currentParent = currentParent->parentWidget(); currentParent = currentParent->parentWidget();
} }
if (qobject_cast<TabDeckEditor *>(currentParent)) { if (qobject_cast<AbstractTabDeckEditor *>(currentParent)) {
auto *deckEditor = qobject_cast<TabDeckEditor *>(currentParent); auto *deckEditor = qobject_cast<AbstractTabDeckEditor *>(currentParent);
QStringList knownTags; QStringList knownTags;
QStringList allFiles = getAllFiles(SettingsCache::instance().getDeckPath()); QStringList allFiles = getAllFiles(SettingsCache::instance().getDeckPath());
DeckLoader loader; DeckLoader loader;