mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Fix #34
This is @mcallahan's patch — see #35. I had to apply this diff by hand, because both `git` and `patch` refused to apply it and I didn't know how to resolve that. Consequently, there might be an error.
This commit is contained in:
parent
0da2647a7b
commit
629668d7c0
4 changed files with 9 additions and 11 deletions
|
|
@ -385,7 +385,7 @@ void TabDeckEditor::actLoadDeck()
|
|||
return;
|
||||
|
||||
QString fileName = dialog.selectedFiles().at(0);
|
||||
DeckLoader::FileFormat fmt = DeckLoader::getFormatFromNameFilter(dialog.selectedNameFilter());
|
||||
DeckLoader::FileFormat fmt = DeckLoader::getFormatFromName(fileName);
|
||||
|
||||
DeckLoader *l = new DeckLoader;
|
||||
if (l->loadFromFile(fileName, fmt))
|
||||
|
|
@ -438,7 +438,7 @@ bool TabDeckEditor::actSaveDeckAs()
|
|||
return false;
|
||||
|
||||
QString fileName = dialog.selectedFiles().at(0);
|
||||
DeckLoader::FileFormat fmt = DeckLoader::getFormatFromNameFilter(dialog.selectedNameFilter());
|
||||
DeckLoader::FileFormat fmt = DeckLoader::getFormatFromName(fileName);
|
||||
|
||||
if (!deckModel->getDeckList()->saveToFile(fileName, fmt)) {
|
||||
QMessageBox::critical(this, tr("Error"), tr("The deck could not be saved.\nPlease check that the directory is writable and try again."));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue