Commit 0b8fab47 authored by Fizztastic's avatar Fizztastic
Browse files

Load .cod files from clipboard

parent bfa002e5
......@@ -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