mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Create a new dive site and edit it automatically
If the user clicks on the first or second option of the drop down list, subsurface will move him to the dive site edit panel automatically, since it's a new dive site and there's no information about it yet. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0ba832ef12
commit
fc6d819616
4 changed files with 18 additions and 8 deletions
|
@ -53,7 +53,7 @@ QVariant LocationInformationModel::data(const QModelIndex &index, int role) cons
|
|||
// Special case to handle the 'create dive site' with name.
|
||||
if (index.row() < 2) {
|
||||
if (index.column() == UUID)
|
||||
return 0;
|
||||
return RECENTLY_ADDED_DIVESITE;
|
||||
switch(role) {
|
||||
case Qt::DisplayRole : {
|
||||
if (index.row() == 1) {
|
||||
|
@ -92,7 +92,7 @@ QVariant LocationInformationModel::data(const QModelIndex &index, int role) cons
|
|||
case Qt::DisplayRole :
|
||||
switch(index.column()) {
|
||||
case UUID: return ds->uuid;
|
||||
case NAME: return ds->name;
|
||||
case NAME: return QString("%1, id:%2").arg(ds->name).arg(ds->uuid);
|
||||
case LATITUDE: return ds->latitude.udeg;
|
||||
case LONGITUDE: return ds->longitude.udeg;
|
||||
case COORDS: return "TODO";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue