mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive site: fix oversight in 920eb7576f
In commit 920eb7576f
"dive_site *"
was included in Qt's "metatype" system to be able to pass it
through QVariants. One instance was forgotten and a "void *"
was passed in. On readout NULL was returned, which made it
impossible to add new dive-sites under certain circumstances.
Convert this one instance to a proper "dive_site *" QVariant.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
3e838ee74d
commit
dec9401f48
1 changed files with 1 additions and 1 deletions
|
@ -381,7 +381,7 @@ QVariant DiveLocationModel::data(const QModelIndex &index, int role) const
|
||||||
|
|
||||||
if (index.row() <= 1) { // two special cases.
|
if (index.row() <= 1) { // two special cases.
|
||||||
if (index.column() == LocationInformationModel::DIVESITE)
|
if (index.column() == LocationInformationModel::DIVESITE)
|
||||||
return QVariant::fromValue<void *>(RECENTLY_ADDED_DIVESITE);
|
return QVariant::fromValue<dive_site *>(RECENTLY_ADDED_DIVESITE);
|
||||||
switch (role) {
|
switch (role) {
|
||||||
case Qt::DisplayRole:
|
case Qt::DisplayRole:
|
||||||
return new_ds_value[index.row()];
|
return new_ds_value[index.row()];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue