mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
DiveListModel: don't add the dives one at a time
Most of the time we are adding all the dives, so do this in a single model operation. This makes the case when adding a single dive (in the undo delete function) slightly more complicated, but that seems totally worth it for the speedup in the common case. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f16a3a1709
commit
1634c62b9a
3 changed files with 30 additions and 24 deletions
|
|
@ -30,7 +30,8 @@ public:
|
|||
|
||||
static DiveListModel *instance();
|
||||
DiveListModel(QObject *parent = 0);
|
||||
void addDive(dive *d);
|
||||
void addDive(QList<dive *> listOfDives);
|
||||
void addAllDives();
|
||||
void insertDive(int i, DiveObjectHelper *newDive);
|
||||
void removeDive(int i);
|
||||
void removeDiveById(int id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue