summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dive.h3
-rw-r--r--qt-ui/divecomponentselection.ui57
-rw-r--r--qt-ui/maintab.cpp5
-rw-r--r--qt-ui/simplewidgets.cpp6
4 files changed, 30 insertions, 41 deletions
diff --git a/dive.h b/dive.h
index 76ea4b597..09c831e43 100644
--- a/dive.h
+++ b/dive.h
@@ -349,14 +349,13 @@ extern int get_cylinder_idx_by_use(struct dive *dive, enum cylinderuse cylinder_
/* when selectively copying dive information, which parts should be copied? */
struct dive_components {
- unsigned int location : 1;
+ unsigned int divesite : 1;
unsigned int notes : 1;
unsigned int divemaster : 1;
unsigned int buddy : 1;
unsigned int suit : 1;
unsigned int rating : 1;
unsigned int visibility : 1;
- unsigned int gps : 1;
unsigned int tags : 1;
unsigned int cylinders : 1;
unsigned int weights : 1;
diff --git a/qt-ui/divecomponentselection.ui b/qt-ui/divecomponentselection.ui
index dbd0839ba..7eade039b 100644
--- a/qt-ui/divecomponentselection.ui
+++ b/qt-ui/divecomponentselection.ui
@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>308</width>
- <height>263</height>
+ <width>401</width>
+ <height>317</height>
</rect>
</property>
<property name="sizePolicy">
@@ -41,9 +41,9 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
- <widget class="QCheckBox" name="location">
+ <widget class="QCheckBox" name="divesite">
<property name="text">
- <string>Location</string>
+ <string>Dive site</string>
</property>
</widget>
</item>
@@ -54,34 +54,6 @@
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QCheckBox" name="gps">
- <property name="text">
- <string>GPS coordinates</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QCheckBox" name="divemaster">
- <property name="text">
- <string>Divemaster</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QCheckBox" name="buddy">
- <property name="text">
- <string>Buddy</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QCheckBox" name="rating">
- <property name="text">
- <string>Rating</string>
- </property>
- </widget>
- </item>
<item row="5" column="0">
<widget class="QCheckBox" name="visibility">
<property name="text">
@@ -117,6 +89,27 @@
</property>
</widget>
</item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="divemaster">
+ <property name="text">
+ <string>Divemaster</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="buddy">
+ <property name="text">
+ <string>Buddy</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="rating">
+ <property name="text">
+ <string>Rating</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index b0c2009d3..e2ccd44de 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -1314,7 +1314,6 @@ void MainTab::showAndTriggerEditSelective(struct dive_components what)
// take the data in our copyPasteDive and apply it to selected dives
enableEdition();
copyPaste = true;
- SHOW_SELECTIVE(location);
SHOW_SELECTIVE(buddy);
SHOW_SELECTIVE(divemaster);
SHOW_SELECTIVE(suit);
@@ -1329,8 +1328,8 @@ void MainTab::showAndTriggerEditSelective(struct dive_components what)
ui.rating->setCurrentStars(displayed_dive.rating);
if (what.visibility)
ui.visibility->setCurrentStars(displayed_dive.visibility);
- if (what.gps)
- updateGpsCoordinates();
+ if (what.divesite)
+ ui.location->setText(get_dive_location(&displayed_dive));
if (what.tags) {
char buf[1024];
taglist_get_tagstring(displayed_dive.tag_list, buf, 1024);
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index 756251b51..97b39ee61 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -457,8 +457,7 @@ DiveComponentSelection::DiveComponentSelection(QWidget *parent, struct dive *tar
{
ui.setupUi(this);
what = _what;
- UI_FROM_COMPONENT(location);
- UI_FROM_COMPONENT(gps);
+ UI_FROM_COMPONENT(divesite);
UI_FROM_COMPONENT(divemaster);
UI_FROM_COMPONENT(buddy);
UI_FROM_COMPONENT(rating);
@@ -478,8 +477,7 @@ DiveComponentSelection::DiveComponentSelection(QWidget *parent, struct dive *tar
void DiveComponentSelection::buttonClicked(QAbstractButton *button)
{
if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole) {
- COMPONENT_FROM_UI(location);
- COMPONENT_FROM_UI(gps);
+ COMPONENT_FROM_UI(divesite);
COMPONENT_FROM_UI(divemaster);
COMPONENT_FROM_UI(buddy);
COMPONENT_FROM_UI(rating);