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:
Lukas Brübach 2026-04-29 09:18:15 +02:00
parent b1fe4c85d3
commit 3f030fe2dc
3 changed files with 31 additions and 0 deletions

View file

@ -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'\''},