Skip to content

Commit a38258b

Browse files
committed
Set default focus on ok buttons in item dialogs
1 parent cd31a36 commit a38258b

10 files changed

+25
-1
lines changed

src/dialogs/peak_dialog.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ PeakDialog::PeakDialog(QWidget* parent, Database* db, DialogPurpose purpose, Pea
5353
restoreDialogGeometry(this, parent, &Settings::peakDialog_geometry);
5454
setFixedHeight(minimumSizeHint().height());
5555

56+
5657
populateComboBoxes();
5758

5859

src/dialogs/range_dialog.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ RangeDialog::RangeDialog(QWidget* parent, Database* db, DialogPurpose purpose, R
5252
restoreDialogGeometry(this, parent, &Settings::rangeDialog_geometry);
5353
setFixedHeight(minimumSizeHint().height());
5454

55+
5556
populateComboBoxes();
5657

5758

src/dialogs/region_dialog.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ RegionDialog::RegionDialog(QWidget* parent, Database* db, DialogPurpose purpose,
5555
restoreDialogGeometry(this, parent, &Settings::regionDialog_geometry);
5656
setFixedHeight(minimumSizeHint().height());
5757

58+
5859
populateComboBoxes();
5960

6061

src/ui/ascent_dialog.ui

+3
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,9 @@
801801
<property name="text">
802802
<string>Add ascent</string>
803803
</property>
804+
<property name="default">
805+
<bool>true</bool>
806+
</property>
804807
</widget>
805808
</item>
806809
<item>

src/ui/country_dialog.ui

+3
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@
100100
<property name="text">
101101
<string>Add country</string>
102102
</property>
103+
<property name="default">
104+
<bool>true</bool>
105+
</property>
103106
</widget>
104107
</item>
105108
<item>

src/ui/hiker_dialog.ui

+3
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@
100100
<property name="text">
101101
<string>Add hiker</string>
102102
</property>
103+
<property name="default">
104+
<bool>true</bool>
105+
</property>
103106
</widget>
104107
</item>
105108
<item>

src/ui/peak_dialog.ui

+3
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,9 @@
322322
<property name="text">
323323
<string>Add peak</string>
324324
</property>
325+
<property name="default">
326+
<bool>true</bool>
327+
</property>
325328
</widget>
326329
</item>
327330
<item>

src/ui/range_dialog.ui

+3
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@
126126
<property name="text">
127127
<string>Add mountain range</string>
128128
</property>
129+
<property name="default">
130+
<bool>true</bool>
131+
</property>
129132
</widget>
130133
</item>
131134
<item>

src/ui/region_dialog.ui

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<rect>
77
<x>0</x>
88
<y>0</y>
9-
<width>408</width>
9+
<width>428</width>
1010
<height>172</height>
1111
</rect>
1212
</property>
@@ -200,6 +200,9 @@
200200
<property name="text">
201201
<string>Add region</string>
202202
</property>
203+
<property name="default">
204+
<bool>true</bool>
205+
</property>
203206
</widget>
204207
</item>
205208
<item>

src/ui/trip_dialog.ui

+3
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,9 @@
251251
<property name="text">
252252
<string>Add trip</string>
253253
</property>
254+
<property name="default">
255+
<bool>true</bool>
256+
</property>
254257
</widget>
255258
</item>
256259
<item>

0 commit comments

Comments
 (0)