mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix the connections for the Location Edit
The LocationEdit now correctly connects to the QComboBox signals, not the QLineEdit signals. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ac6a7ab24e
commit
b0d7d0f3b9
2 changed files with 13 additions and 4 deletions
|
@ -760,7 +760,6 @@ void MainTab::acceptChanges()
|
||||||
ui.dateEdit->setEnabled(true);
|
ui.dateEdit->setEnabled(true);
|
||||||
hideMessage();
|
hideMessage();
|
||||||
ui.equipmentTab->setEnabled(true);
|
ui.equipmentTab->setEnabled(true);
|
||||||
on_location_editingFinished(); // complete coordinates *before* saving
|
|
||||||
if (editMode == ADD) {
|
if (editMode == ADD) {
|
||||||
// We need to add the dive we just created to the dive list and select it.
|
// We need to add the dive we just created to the dive list and select it.
|
||||||
// Easy, right?
|
// Easy, right?
|
||||||
|
@ -1255,7 +1254,13 @@ void MainTab::on_tagWidget_textChanged()
|
||||||
markChangedWidget(ui.tagWidget);
|
markChangedWidget(ui.tagWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainTab::on_location_textChanged(const QString &text)
|
/* TODO: This seems wrong.
|
||||||
|
* The code here below should be triggered when the user changes
|
||||||
|
* the Location in the combobox (this was a LineEdit, but the code is
|
||||||
|
* mostly the same ). Check the currentTrip there to see if it`s being
|
||||||
|
* correctly triggered.
|
||||||
|
*/
|
||||||
|
void MainTab::on_location_currentTextChanged(const QString &text)
|
||||||
{
|
{
|
||||||
if (editMode == IGNORE || acceptingEdit == true)
|
if (editMode == IGNORE || acceptingEdit == true)
|
||||||
return;
|
return;
|
||||||
|
@ -1263,9 +1268,13 @@ void MainTab::on_location_textChanged(const QString &text)
|
||||||
free(displayedTrip.location);
|
free(displayedTrip.location);
|
||||||
displayedTrip.location = strdup(qPrintable(ui.location->currentText()));
|
displayedTrip.location = strdup(qPrintable(ui.location->currentText()));
|
||||||
}
|
}
|
||||||
|
if (current_dive && text == QString(get_dive_site_by_uuid(current_dive->dive_site_uuid)->name))
|
||||||
|
return;
|
||||||
markChangedWidget(ui.location);
|
markChangedWidget(ui.location);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO:
|
||||||
|
* Check if we need to move this to location management.
|
||||||
// If we have GPS data for the location entered, add it.
|
// If we have GPS data for the location entered, add it.
|
||||||
void MainTab::on_location_editingFinished()
|
void MainTab::on_location_editingFinished()
|
||||||
{
|
{
|
||||||
|
@ -1277,6 +1286,7 @@ void MainTab::on_location_editingFinished()
|
||||||
displayed_dive.dive_site_uuid = uuid;
|
displayed_dive.dive_site_uuid = uuid;
|
||||||
free((void*)name);
|
free((void*)name);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
void MainTab::on_suit_textChanged(const QString &text)
|
void MainTab::on_suit_textChanged(const QString &text)
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,8 +65,7 @@ slots:
|
||||||
void updateDiveInfo(bool clear = false);
|
void updateDiveInfo(bool clear = false);
|
||||||
void acceptChanges();
|
void acceptChanges();
|
||||||
void rejectChanges();
|
void rejectChanges();
|
||||||
void on_location_textChanged(const QString &text);
|
void on_location_currentTextChanged(const QString &text);
|
||||||
void on_location_editingFinished();
|
|
||||||
void on_divemaster_textChanged();
|
void on_divemaster_textChanged();
|
||||||
void on_buddy_textChanged();
|
void on_buddy_textChanged();
|
||||||
void on_suit_textChanged(const QString &text);
|
void on_suit_textChanged(const QString &text);
|
||||||
|
|
Loading…
Add table
Reference in a new issue