mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Simplify model handling and crashes fixes
So, there's only one crash left (that I put a big TODO: on the maintab.cpp about) and I'll fix it tomorrow as it's quite late here and I'm almost sleeping at the keyboard. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ee9746c622
commit
6cd85d9b73
6 changed files with 41 additions and 13 deletions
|
@ -91,7 +91,7 @@ void LocationInformationWidget::acceptChanges()
|
|||
currentDs->notes = copy_string(uiString);
|
||||
}
|
||||
if (dive_site_is_empty(currentDs)) {
|
||||
delete_dive_site(currentDs->uuid);
|
||||
LocationInformationModel::instance()->removeRow(get_divesite_idx(currentDs));
|
||||
displayed_dive.dive_site_uuid = 0;
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ void LocationInformationWidget::acceptChanges()
|
|||
void LocationInformationWidget::rejectChanges()
|
||||
{
|
||||
if (currentDs && dive_site_is_empty(currentDs)) {
|
||||
delete_dive_site(currentDs->uuid);
|
||||
LocationInformationModel::instance()->removeRow(get_divesite_idx(currentDs));
|
||||
displayed_dive.dive_site_uuid = 0;
|
||||
}
|
||||
resetState();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue