mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
QML UI: clear the previous list when downloading
When you start a new session with Download from DC, clear out the table from the last attempt before adding the page. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
27deb317b0
commit
77a3e6ac70
3 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,7 @@ Kirigami.Page {
|
||||||
title: qsTr("Dive Computer")
|
title: qsTr("Dive Computer")
|
||||||
|
|
||||||
property bool selectAll : false
|
property bool selectAll : false
|
||||||
|
property alias dcImportModel: importModel
|
||||||
|
|
||||||
DCDownloadThread {
|
DCDownloadThread {
|
||||||
id: downloadThread
|
id: downloadThread
|
||||||
|
|
|
@ -157,6 +157,7 @@ Kirigami.ApplicationWindow {
|
||||||
text: qsTr("Download from DC")
|
text: qsTr("Download from DC")
|
||||||
enabled: true
|
enabled: true
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
|
downloadFromDc.dcImportModel.clearTable()
|
||||||
stackView.push(downloadFromDc)
|
stackView.push(downloadFromDc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ public:
|
||||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||||
void setImportedDivesIndexes(int first, int last);
|
void setImportedDivesIndexes(int first, int last);
|
||||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||||
void clearTable();
|
Q_INVOKABLE void clearTable();
|
||||||
QHash<int, QByteArray> roleNames() const;
|
QHash<int, QByteArray> roleNames() const;
|
||||||
Q_INVOKABLE void repopulate();
|
Q_INVOKABLE void repopulate();
|
||||||
Q_INVOKABLE void recordDives();
|
Q_INVOKABLE void recordDives();
|
||||||
|
|
Loading…
Add table
Reference in a new issue