mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
File selector should filter images we can actually handle.
So better ask Qt about image formats known to it. Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
59bbaa7820
commit
462797396b
4 changed files with 18 additions and 5 deletions
|
@ -917,7 +917,12 @@ void DiveListView::shiftTimes()
|
|||
|
||||
void DiveListView::loadImages()
|
||||
{
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open image files"), lastUsedImageDir(), tr("Image files (*.jpg *.jpeg *.pnm *.tif *.tiff)"));
|
||||
QStringList filters = imageExtensionFilters();
|
||||
QStringList fileNames = QFileDialog::getOpenFileNames(this,
|
||||
tr("Open image files"),
|
||||
lastUsedImageDir(),
|
||||
tr("Image files (%1)").arg(filters.join(" ")));
|
||||
|
||||
if (fileNames.isEmpty())
|
||||
return;
|
||||
updateLastUsedImageDir(QFileInfo(fileNames[0]).dir().path());
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "core/display.h"
|
||||
#include "profile-widget/profilewidget2.h"
|
||||
#include "desktop-widgets/undocommands.h"
|
||||
#include "core/qthelper.h"
|
||||
|
||||
class MinMaxAvgWidgetPrivate {
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue