mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +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")
|
||||
|
||||
property bool selectAll : false
|
||||
property alias dcImportModel: importModel
|
||||
|
||||
DCDownloadThread {
|
||||
id: downloadThread
|
||||
|
|
|
@ -157,6 +157,7 @@ Kirigami.ApplicationWindow {
|
|||
text: qsTr("Download from DC")
|
||||
enabled: true
|
||||
onTriggered: {
|
||||
downloadFromDc.dcImportModel.clearTable()
|
||||
stackView.push(downloadFromDc)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ public:
|
|||
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
|
||||
void setImportedDivesIndexes(int first, int last);
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
void clearTable();
|
||||
Q_INVOKABLE void clearTable();
|
||||
QHash<int, QByteArray> roleNames() const;
|
||||
Q_INVOKABLE void repopulate();
|
||||
Q_INVOKABLE void recordDives();
|
||||
|
|
Loading…
Reference in a new issue