mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-25 08:03:54 -07: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:
parent
18ac4c2bd4
commit
d77ee00e70
1 changed files with 6 additions and 1 deletions
|
|
@ -13,7 +13,8 @@
|
||||||
DeckPreviewWidget::DeckPreviewWidget(QWidget *_parent,
|
DeckPreviewWidget::DeckPreviewWidget(QWidget *_parent,
|
||||||
VisualDeckStorageWidget *_visualDeckStorageWidget,
|
VisualDeckStorageWidget *_visualDeckStorageWidget,
|
||||||
const QString &_filePath)
|
const QString &_filePath)
|
||||||
: QWidget(_parent), visualDeckStorageWidget(_visualDeckStorageWidget), filePath(_filePath)
|
: QWidget(_parent), visualDeckStorageWidget(_visualDeckStorageWidget), filePath(_filePath),
|
||||||
|
colorIdentityWidget(nullptr), deckTagsDisplayWidget(nullptr)
|
||||||
{
|
{
|
||||||
layout = new QVBoxLayout(this);
|
layout = new QVBoxLayout(this);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
@ -79,6 +80,10 @@ bool DeckPreviewWidget::checkVisibility() const
|
||||||
|
|
||||||
void DeckPreviewWidget::updateTagsVisibility(bool visible)
|
void DeckPreviewWidget::updateTagsVisibility(bool visible)
|
||||||
{
|
{
|
||||||
|
if (!deckTagsDisplayWidget) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (visible) {
|
if (visible) {
|
||||||
deckTagsDisplayWidget->setVisible(true);
|
deckTagsDisplayWidget->setVisible(true);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue