mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-09 09:35:56 -05:00
Fix crash when VDS show tags is unchecked (#5605)
* Fix crash when VDS show tags is unchecked * revert the refactor since I don't know if there's a reason they did it that way
This commit is contained in:
@@ -13,7 +13,8 @@
|
||||
DeckPreviewWidget::DeckPreviewWidget(QWidget *_parent,
|
||||
VisualDeckStorageWidget *_visualDeckStorageWidget,
|
||||
const QString &_filePath)
|
||||
: QWidget(_parent), visualDeckStorageWidget(_visualDeckStorageWidget), filePath(_filePath)
|
||||
: QWidget(_parent), visualDeckStorageWidget(_visualDeckStorageWidget), filePath(_filePath),
|
||||
colorIdentityWidget(nullptr), deckTagsDisplayWidget(nullptr)
|
||||
{
|
||||
layout = new QVBoxLayout(this);
|
||||
setLayout(layout);
|
||||
@@ -79,6 +80,10 @@ bool DeckPreviewWidget::checkVisibility() const
|
||||
|
||||
void DeckPreviewWidget::updateTagsVisibility(bool visible)
|
||||
{
|
||||
if (!deckTagsDisplayWidget) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (visible) {
|
||||
deckTagsDisplayWidget->setVisible(true);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user