Make lastUsedImageDir static to prevent a crash

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Robert C. Helling 2014-02-19 00:26:36 +01:00 committed by Dirk Hohndel
parent a814a5c904
commit 226b55893d
2 changed files with 2 additions and 3 deletions

View file

@ -52,7 +52,7 @@ public slots:
void shiftTimes();
void loadImages();
void uploadToDivelogsDE();
QString lastUsedImageDir();
static QString lastUsedImageDir();
signals:
void currentDiveChanged(int divenr);

View file

@ -180,9 +180,8 @@ void ShiftImageTimesDialog::syncCameraClicked()
QDateTime dcDateTime = QDateTime();
QStringList fileNames = QFileDialog::getOpenFileNames(this,
tr("Open Image File"),
MainWindow().dive_list()->lastUsedImageDir(),
DiveListView::lastUsedImageDir(),
tr("Image Files (*.jpg *.jpeg *.pnm *.tif *.tiff)"));
if (fileNames.isEmpty())
return;