diff options
-rw-r--r-- | qt-ui/profile/diveplotdatamodel.cpp | 7 | ||||
-rw-r--r-- | qt-ui/profile/diveplotdatamodel.h | 2 |
2 files changed, 2 insertions, 7 deletions
diff --git a/qt-ui/profile/diveplotdatamodel.cpp b/qt-ui/profile/diveplotdatamodel.cpp index a754b0e79..94a8af5ba 100644 --- a/qt-ui/profile/diveplotdatamodel.cpp +++ b/qt-ui/profile/diveplotdatamodel.cpp @@ -106,13 +106,8 @@ void DivePlotDataModel::clear() void DivePlotDataModel::setDive(dive* d, const plot_info& info) { - // We need a way to find out if the dive setted is the same old dive, but pointers change, - // and there's no UUID, for now, just repopulate everything. clear(); - struct divecomputer *dc = NULL; - - if (d) - dc = select_dc(&d->dc); + Q_ASSERT(d != NULL); diveId = d->id; pInfo = info; beginInsertRows(QModelIndex(), 0, pInfo.nr-1); diff --git a/qt-ui/profile/diveplotdatamodel.h b/qt-ui/profile/diveplotdatamodel.h index e84645b40..47ebe03e0 100644 --- a/qt-ui/profile/diveplotdatamodel.h +++ b/qt-ui/profile/diveplotdatamodel.h @@ -34,4 +34,4 @@ private: int diveId; }; -#endif
\ No newline at end of file +#endif |