Restore the selected index in the folders view when doing partial updates

This commit is contained in:
Luis Ángel San Martín
2022-10-24 22:59:21 +02:00
parent 0556276374
commit 54d2fba53d
3 changed files with 51 additions and 6 deletions

View File

@ -54,6 +54,7 @@ public:
int role = Qt::DisplayRole) const override;
QModelIndex index(int row, int column,
const QModelIndex &parent = QModelIndex()) const override;
QModelIndex index(qulonglong folderId) const;
QModelIndex parent(const QModelIndex &index) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
@ -61,6 +62,7 @@ public:
// Convenience methods
void reload();
void reload(const QModelIndex &index);
void setupModelData(QString path);
QString getDatabase();
QString getFolderPath(const QModelIndex &folder);