mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 09:33:57 -07:00
use QtUtils
This commit is contained in:
parent
5efac416ab
commit
28adf91453
1 changed files with 2 additions and 7 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
#include <QResizeEvent>
|
#include <QResizeEvent>
|
||||||
#include <QSize>
|
#include <QSize>
|
||||||
|
#include <libcockatrice/utility/qt_utils.h>
|
||||||
|
|
||||||
ColorIdentityWidget::ColorIdentityWidget(QWidget *parent, const QString &_colorIdentity)
|
ColorIdentityWidget::ColorIdentityWidget(QWidget *parent, const QString &_colorIdentity)
|
||||||
: QWidget(parent), colorIdentity(_colorIdentity)
|
: QWidget(parent), colorIdentity(_colorIdentity)
|
||||||
|
|
@ -46,13 +47,7 @@ void ColorIdentityWidget::populateManaSymbolWidgets()
|
||||||
|
|
||||||
void ColorIdentityWidget::toggleUnusedVisibility()
|
void ColorIdentityWidget::toggleUnusedVisibility()
|
||||||
{
|
{
|
||||||
if (layout != nullptr) {
|
QtUtils::clearLayoutRec(layout);
|
||||||
QLayoutItem *item;
|
|
||||||
while ((item = layout->takeAt(0)) != nullptr) {
|
|
||||||
item->widget()->deleteLater(); // Delete the widget
|
|
||||||
delete item; // Delete the layout item
|
|
||||||
}
|
|
||||||
}
|
|
||||||
populateManaSymbolWidgets();
|
populateManaSymbolWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue