mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
Reload BannerCardDisplay on BannerCard set, lint some stuff.
This commit is contained in:
parent
ea723620ae
commit
dffbb95d3a
3 changed files with 4 additions and 2 deletions
|
|
@ -123,7 +123,7 @@ void DeckPreviewTagAdditionWidget::mousePressEvent(QMouseEvent *event)
|
|||
QStringList knownTags;
|
||||
QStringList allFiles = getAllFiles(SettingsCache::instance().getDeckPath(), true);
|
||||
auto *loader = new DeckLoader();
|
||||
for (const QString& file : allFiles) {
|
||||
for (const QString &file : allFiles) {
|
||||
loader->loadFromFile(file, DeckLoader::getFormatFromName(file), false);
|
||||
QStringList tags = loader->getTags();
|
||||
knownTags.append(tags);
|
||||
|
|
|
|||
|
|
@ -252,6 +252,8 @@ void DeckPreviewWidget::setBannerCard(int /* changedIndex */)
|
|||
QVariantMap itemData = bannerCardComboBox->itemData(bannerCardComboBox->currentIndex()).toMap();
|
||||
deckLoader->setBannerCard(QPair<QString, QString>(itemData["name"].toString(), itemData["uuid"].toString()));
|
||||
deckLoader->saveToFile(filePath, DeckLoader::getFormatFromName(filePath));
|
||||
bannerCardDisplayWidget->setCard(CardDatabaseManager::getInstance()->getCardByNameAndProviderId(
|
||||
itemData["name"].toString(), itemData["uuid"].toString()));
|
||||
}
|
||||
|
||||
void DeckPreviewWidget::imageClickedEvent(QMouseEvent *event, DeckPreviewCardPictureWidget *instance)
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
|
||||
#include <QComboBox>
|
||||
#include <QDirIterator>
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QMouseEvent>
|
||||
#include <QVBoxLayout>
|
||||
#include <QFileSystemWatcher>
|
||||
|
||||
VisualDeckStorageWidget::VisualDeckStorageWidget(QWidget *parent) : QWidget(parent), folderWidget(nullptr)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue