mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive site rewrite: fix adding a new dive and chaning notes / description
I had to create an event filter to deal with the missing callbacks from QPlainTextEdit (it doesn't support editingFinished()). Also we need to manually create a dive site on a newly added dive if the user entered one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c2f7702805
commit
dee59e5334
3 changed files with 23 additions and 5 deletions
|
@ -805,7 +805,10 @@ void MainTab::acceptChanges()
|
|||
addedId = added_dive->id;
|
||||
if (displayed_dive_site.uuid)
|
||||
copy_dive_site(&displayed_dive_site, get_dive_site_by_uuid(displayed_dive_site.uuid));
|
||||
|
||||
else if (ui.location->text().count()) {
|
||||
uint32_t uuid = create_dive_site(qPrintable(ui.location->text()));
|
||||
added_dive->dive_site_uuid = uuid;
|
||||
}
|
||||
// unselect everything as far as the UI is concerned and select the new
|
||||
// dive - we'll have to undo/redo this later after we resort the dive_table
|
||||
// but we need the dive selected for the middle part of this function - this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue