mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Hide any pictures shown when closing divelog
Fixes #776 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b575069638
commit
4029c87ec7
2 changed files with 4 additions and 1 deletions
|
@ -44,7 +44,8 @@ void DivePictureModel::updateDivePictures()
|
|||
endRemoveRows();
|
||||
}
|
||||
|
||||
numberOfPictures = dive_get_picture_count(&displayed_dive);
|
||||
// if the dive_table is empty, ignore the displayed_dive
|
||||
numberOfPictures = dive_table.nr == 0 ? 0 : dive_get_picture_count(&displayed_dive);
|
||||
if (numberOfPictures == 0) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -289,6 +289,8 @@ void MainWindow::on_actionClose_triggered()
|
|||
{
|
||||
if (okToClose(tr("Please save or cancel the current dive edit before closing the file."))) {
|
||||
closeCurrentFile();
|
||||
// hide any pictures and the filter
|
||||
DivePictureModel::instance()->updateDivePictures();
|
||||
ui.multiFilter->closeFilter();
|
||||
recreateDiveList();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue