mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Import: Make Directory Selectable when Importing .fit Files.
In the 'Download from dive computer' dialogue, make it possible to select the source directory for the import. Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
parent
528532572f
commit
f4e61aa5dc
1 changed files with 8 additions and 3 deletions
|
@ -24,7 +24,7 @@
|
|||
|
||||
static bool is_vendor_searchable(QString vendor)
|
||||
{
|
||||
return vendor == "Uemis" || vendor == "Garmin";
|
||||
return vendor == "Uemis" || vendor == "Garmin" || vendor == "FIT";
|
||||
}
|
||||
|
||||
DownloadFromDCWidget::DownloadFromDCWidget(const QString &filename, QWidget *parent) : QDialog(parent, QFlag(0)),
|
||||
|
@ -380,8 +380,13 @@ void DownloadFromDCWidget::on_device_currentTextChanged(const QString &device)
|
|||
void DownloadFromDCWidget::on_search_clicked()
|
||||
{
|
||||
if (is_vendor_searchable(ui.vendor->currentText())) {
|
||||
QString dialogTitle = ui.vendor->currentText() == "Uemis" ?
|
||||
tr("Find Uemis dive computer") : tr("Find Garmin dive computer");
|
||||
QString dialogTitle;
|
||||
if (ui.vendor->currentText() == "Uemis")
|
||||
dialogTitle = tr("Find Uemis dive computer");
|
||||
else if (ui.vendor->currentText() == "Garmin")
|
||||
dialogTitle = tr("Find Garmin dive computer");
|
||||
else if (ui.vendor->currentText() == "FIT")
|
||||
dialogTitle = tr("Select diretory to import .fit files from");
|
||||
QString dirName = QFileDialog::getExistingDirectory(this,
|
||||
dialogTitle,
|
||||
QDir::homePath(),
|
||||
|
|
Loading…
Add table
Reference in a new issue