mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Mobile: add helper function to keep selection in sync
Without this the core data structure never gets updated to reflect which dive is currently selected. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2f0689d3b8
commit
9a73be9207
2 changed files with 10 additions and 0 deletions
|
@ -1375,6 +1375,15 @@ bool QMLManager::undoDelete(int id)
|
|||
return true;
|
||||
}
|
||||
|
||||
void QMLManager::selectDive(int id)
|
||||
{
|
||||
int i;
|
||||
struct dive *dive = NULL;
|
||||
|
||||
for_each_dive (i, dive)
|
||||
dive->selected = (dive->id == id);
|
||||
}
|
||||
|
||||
void QMLManager::deleteDive(int id)
|
||||
{
|
||||
struct dive *d = get_dive_by_uniq_id(id);
|
||||
|
|
|
@ -164,6 +164,7 @@ public slots:
|
|||
void openNoCloudRepo();
|
||||
void saveChangesLocal();
|
||||
void saveChangesCloud(bool forceRemoteSync);
|
||||
void selectDive(int id);
|
||||
void deleteDive(int id);
|
||||
void copyDiveData(int id);
|
||||
void pasteDiveData(int id);
|
||||
|
|
Loading…
Add table
Reference in a new issue