mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 09:33:57 -07:00
move clearLayout into populate
This commit is contained in:
parent
28adf91453
commit
0d9d328ee7
1 changed files with 3 additions and 1 deletions
|
|
@ -31,6 +31,9 @@ void ColorIdentityWidget::populateManaSymbolWidgets()
|
||||||
QString fullColorIdentity = "WUBRG";
|
QString fullColorIdentity = "WUBRG";
|
||||||
QStringList symbols = parseColorIdentity(colorIdentity); // Parse mana cost string
|
QStringList symbols = parseColorIdentity(colorIdentity); // Parse mana cost string
|
||||||
|
|
||||||
|
// clear old layout
|
||||||
|
QtUtils::clearLayoutRec(layout);
|
||||||
|
|
||||||
// populate mana symbols
|
// populate mana symbols
|
||||||
if (SettingsCache::instance().getVisualDeckStorageDrawUnusedColorIdentities()) {
|
if (SettingsCache::instance().getVisualDeckStorageDrawUnusedColorIdentities()) {
|
||||||
for (const QString symbol : fullColorIdentity) {
|
for (const QString symbol : fullColorIdentity) {
|
||||||
|
|
@ -47,7 +50,6 @@ void ColorIdentityWidget::populateManaSymbolWidgets()
|
||||||
|
|
||||||
void ColorIdentityWidget::toggleUnusedVisibility()
|
void ColorIdentityWidget::toggleUnusedVisibility()
|
||||||
{
|
{
|
||||||
QtUtils::clearLayoutRec(layout);
|
|
||||||
populateManaSymbolWidgets();
|
populateManaSymbolWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue