mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Fix... something to do with the build?
This commit is contained in:
parent
297654b053
commit
a3e65a3388
2 changed files with 11 additions and 9 deletions
|
|
@ -13,8 +13,10 @@
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
DeckPreviewTagDialog::DeckPreviewTagDialog(const QStringList &knownTags, const QStringList &activeTags, QWidget *parent)
|
DeckPreviewTagDialog::DeckPreviewTagDialog(const QStringList &knownTags,
|
||||||
: QDialog(parent), activeTags_(activeTags), knownTags_(knownTags)
|
const QStringList &_activeTags,
|
||||||
|
QWidget *parent)
|
||||||
|
: QDialog(parent), activeTags(_activeTags), knownTags_(knownTags)
|
||||||
{
|
{
|
||||||
resize(400, 500);
|
resize(400, 500);
|
||||||
|
|
||||||
|
|
@ -110,19 +112,19 @@ void DeckPreviewTagDialog::retranslateUi()
|
||||||
void DeckPreviewTagDialog::refreshTagList()
|
void DeckPreviewTagDialog::refreshTagList()
|
||||||
{
|
{
|
||||||
// First, clear the current tags in the list view
|
// First, clear the current tags in the list view
|
||||||
tagListView_->clear();
|
tagListView->clear();
|
||||||
|
|
||||||
// Get the updated list of tags from SettingsCache
|
// Get the updated list of tags from SettingsCache
|
||||||
QStringList defaultTags = SettingsCache::instance().getVisualDeckStorageDefaultTagsList();
|
QStringList defaultTags = SettingsCache::instance().getVisualDeckStorageDefaultTagsList();
|
||||||
QStringList combinedTags = defaultTags + knownTags_ + activeTags_;
|
QStringList combinedTags = defaultTags + knownTags_ + activeTags;
|
||||||
combinedTags.removeDuplicates();
|
combinedTags.removeDuplicates();
|
||||||
|
|
||||||
// Re-populate the tag list view
|
// Re-populate the tag list view
|
||||||
for (const auto &tag : combinedTags) {
|
for (const auto &tag : combinedTags) {
|
||||||
auto *item = new QListWidgetItem(tagListView_);
|
auto *item = new QListWidgetItem(tagListView);
|
||||||
auto *tagWidget = new DeckPreviewTagItemWidget(tag, activeTags_.contains(tag), this);
|
auto *tagWidget = new DeckPreviewTagItemWidget(tag, activeTags.contains(tag), this);
|
||||||
tagListView_->addItem(item);
|
tagListView->addItem(item);
|
||||||
tagListView_->setItemWidget(item, tagWidget);
|
tagListView->setItemWidget(item, tagWidget);
|
||||||
|
|
||||||
connect(tagWidget->checkBox(), &QCheckBox::toggled, this, &DeckPreviewTagDialog::onCheckboxStateChanged);
|
connect(tagWidget->checkBox(), &QCheckBox::toggled, this, &DeckPreviewTagDialog::onCheckboxStateChanged);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ private:
|
||||||
QPushButton *okButton;
|
QPushButton *okButton;
|
||||||
QPushButton *editButton;
|
QPushButton *editButton;
|
||||||
QPushButton *cancelButton;
|
QPushButton *cancelButton;
|
||||||
QStringList activeTags_;
|
QStringList activeTags;
|
||||||
QStringList knownTags_;
|
QStringList knownTags_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue