mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
fixed issue #49: when editing a remote deck, be able to directly save it there
This commit is contained in:
parent
f00eaa83d4
commit
0eee6d7ab9
23 changed files with 324 additions and 181 deletions
|
|
@ -11,11 +11,12 @@
|
|||
#include "decklistmodel.h"
|
||||
#include "carddatabase.h"
|
||||
#include "settingscache.h"
|
||||
#include "deck_loader.h"
|
||||
|
||||
DeckListModel::DeckListModel(QObject *parent)
|
||||
: QAbstractItemModel(parent)
|
||||
{
|
||||
deckList = new DeckList;
|
||||
deckList = new DeckLoader;
|
||||
connect(deckList, SIGNAL(deckLoaded()), this, SLOT(rebuildTree()));
|
||||
connect(deckList, SIGNAL(deckHashChanged()), this, SIGNAL(deckHashChanged()));
|
||||
root = new InnerDecklistNode;
|
||||
|
|
@ -304,12 +305,10 @@ void DeckListModel::sort(int /*column*/, Qt::SortOrder order)
|
|||
|
||||
void DeckListModel::cleanList()
|
||||
{
|
||||
root->clearTree();
|
||||
deckList->cleanList();
|
||||
reset();
|
||||
setDeckList(new DeckLoader);
|
||||
}
|
||||
|
||||
void DeckListModel::setDeckList(DeckList *_deck)
|
||||
void DeckListModel::setDeckList(DeckLoader *_deck)
|
||||
{
|
||||
delete deckList;
|
||||
deckList = _deck;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue