mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive editing: don't repeatedly loop through whole dive list
On dive editing, for every changed field the code looped through the whole dive-list and modified the selected dives. Instead, get the list of selected dives once and use that. Whereas this may look like a gratuitous optimization, it will make things easier for subsequent commits. Notably, we can pass the list of selected dives to an "UndoObject". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
c30efc95d4
commit
ba9c35215e
2 changed files with 61 additions and 44 deletions
|
@ -118,8 +118,9 @@ private:
|
|||
int lastTabSelectedDive;
|
||||
int lastTabSelectedDiveTrip;
|
||||
void resetPallete();
|
||||
void saveTags();
|
||||
void saveTaggedStrings();
|
||||
void copyTagsToDisplayedDive();
|
||||
void saveTags(const QVector<dive *> &selectedDives);
|
||||
void saveTaggedStrings(const QVector<dive *> &selectedDives);
|
||||
void diffTaggedStrings(QString currentString, QString displayedString, QStringList &addedList, QStringList &removedList);
|
||||
void markChangedWidget(QWidget *w);
|
||||
dive_trip_t *currentTrip;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue