mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix wrong handling of Dive Table, and revert some wrong changes.
This patch just reverts some wrong changes that I'v done on a past commit ( sorry ) and correctly handles the selectDive, by using a IDX instead of the dive pointer, as dirk told me it's extremely error-prone since the pointer can change. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c1a05fd034
commit
4f9526ef81
6 changed files with 32 additions and 74 deletions
|
@ -192,7 +192,7 @@ public:
|
|||
enum Column {NR, DATE, RATING, DEPTH, DURATION, TEMPERATURE, TOTALWEIGHT,
|
||||
SUIT, CYLINDER, NITROX, SAC, OTU, MAXCNS, LOCATION, COLUMNS };
|
||||
|
||||
enum ExtraRoles{STAR_ROLE = Qt::UserRole + 1, DIVE_ROLE, TRIP_ROLE, SORT_ROLE};
|
||||
enum ExtraRoles{STAR_ROLE = Qt::UserRole + 1, DIVE_ROLE, TRIP_ROLE, SORT_ROLE, DIVE_IDX};
|
||||
enum Layout{TREE, LIST, CURRENT};
|
||||
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
|
@ -200,8 +200,6 @@ public:
|
|||
DiveTripModel(QObject* parent = 0);
|
||||
Layout layout() const;
|
||||
void setLayout(Layout layout);
|
||||
void deleteSelectedDives();
|
||||
|
||||
private:
|
||||
void setupModelData();
|
||||
QMap<dive_trip_t*, TripItem*> trips;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue