Commit 2b484aa9 authored by Zach's avatar Zach
Browse files

Merge pull request #1221 from Fizztastic/fix_818

Load .cod files from clipboard in deck editor
parents e76c109f 0b8fab47
......@@ -48,7 +48,20 @@ void DlgLoadDeckFromClipboard::actOK()
QTextStream stream(&buffer);
DeckLoader *l = new DeckLoader;
if (l->loadFromStream_Plain(stream)) {
if (buffer.contains("<cockatrice_deck version=\"1\">"))
{
if (l->loadFromString_Native(buffer))
{
deckList = l;
accept();
}
else
{
QMessageBox::critical(this, tr("Error"), tr("Invalid deck list."));
delete l;
}
}
else if (l->loadFromStream_Plain(stream)) {
deckList = l;
accept();
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment