mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 14:32:15 -07:00
Cast to abstract tab deck editor instead of regular.
This commit is contained in:
parent
a3e65a3388
commit
8639630ff0
1 changed files with 5 additions and 4 deletions
|
|
@ -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<TabDeckEditor *>(currentParent)) {
|
||||
if (qobject_cast<AbstractTabDeckEditor *>(currentParent)) {
|
||||
break;
|
||||
}
|
||||
currentParent = currentParent->parentWidget();
|
||||
}
|
||||
if (qobject_cast<TabDeckEditor *>(currentParent)) {
|
||||
auto *deckEditor = qobject_cast<TabDeckEditor *>(currentParent);
|
||||
if (qobject_cast<AbstractTabDeckEditor *>(currentParent)) {
|
||||
auto *deckEditor = qobject_cast<AbstractTabDeckEditor *>(currentParent);
|
||||
QStringList knownTags;
|
||||
QStringList allFiles = getAllFiles(SettingsCache::instance().getDeckPath());
|
||||
DeckLoader loader;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue