mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 17:13: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 <QResizeEvent>
|
||||
#include <QSize>
|
||||
#include <libcockatrice/utility/qt_utils.h>
|
||||
|
||||
ColorIdentityWidget::ColorIdentityWidget(QWidget *parent, const QString &_colorIdentity)
|
||||
: QWidget(parent), colorIdentity(_colorIdentity)
|
||||
|
|
@ -46,13 +47,7 @@ void ColorIdentityWidget::populateManaSymbolWidgets()
|
|||
|
||||
void ColorIdentityWidget::toggleUnusedVisibility()
|
||||
{
|
||||
if (layout != nullptr) {
|
||||
QLayoutItem *item;
|
||||
while ((item = layout->takeAt(0)) != nullptr) {
|
||||
item->widget()->deleteLater(); // Delete the widget
|
||||
delete item; // Delete the layout item
|
||||
}
|
||||
}
|
||||
QtUtils::clearLayoutRec(layout);
|
||||
populateManaSymbolWidgets();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue