mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
Reload card db and notify enabled sets change on "Manage Sets" dialog save
Took 1 hour 18 minutes Took 6 seconds
This commit is contained in:
parent
b1fe4c85d3
commit
3f030fe2dc
3 changed files with 31 additions and 0 deletions
|
|
@ -15,6 +15,24 @@ CardDatabaseDisplayModel::CardDatabaseDisplayModel(QObject *parent)
|
|||
loadedRowCount = 0;
|
||||
}
|
||||
|
||||
void CardDatabaseDisplayModel::setSourceModel(QAbstractItemModel *model)
|
||||
{
|
||||
QSortFilterProxyModel::setSourceModel(model);
|
||||
|
||||
connect(model, &QAbstractItemModel::rowsInserted, this, [this]() {
|
||||
dirty();
|
||||
});
|
||||
|
||||
connect(model, &QAbstractItemModel::rowsRemoved, this, [this]() {
|
||||
dirty();
|
||||
});
|
||||
|
||||
connect(model, &QAbstractItemModel::modelReset, this, [this]() {
|
||||
loadedRowCount = 0;
|
||||
dirty();
|
||||
});
|
||||
}
|
||||
|
||||
QMap<wchar_t, wchar_t> CardDatabaseDisplayModel::characterTranslation = {{L'“', L'\"'},
|
||||
{L'”', L'\"'},
|
||||
{L'‘', L'\''},
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ private:
|
|||
|
||||
public:
|
||||
explicit CardDatabaseDisplayModel(QObject *parent = nullptr);
|
||||
void setSourceModel(QAbstractItemModel *model) override;
|
||||
void setFilterTree(FilterTree *_filterTree);
|
||||
void setIsToken(FilterBool _isToken)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue