Reload from file when loading a visual deck to ensure latest changes propagate to the decklist.

This commit is contained in:
Lukas Brübach 2025-01-18 22:48:49 +01:00
parent 3aa8e91b20
commit 5cdb8e3f94

View file

@ -181,6 +181,7 @@ void DeckViewContainer::refreshShortcuts()
void DeckViewContainer::loadVisualDeck(QMouseEvent *event, DeckPreviewWidget *instance) void DeckViewContainer::loadVisualDeck(QMouseEvent *event, DeckPreviewWidget *instance)
{ {
Q_UNUSED(event); Q_UNUSED(event);
instance->deckLoader->loadFromFile(instance->filePath, DeckLoader::CockatriceFormat, false);
QString deckString = instance->deckLoader->writeToString_Native(); QString deckString = instance->deckLoader->writeToString_Native();
if (deckString.length() > MAX_FILE_LENGTH) { if (deckString.length() > MAX_FILE_LENGTH) {