From 5b2a1a3a7aff68442e4117c2918c495e993a1552 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Tue, 3 Oct 2023 20:43:41 +0200 Subject: [PATCH] Prefill file name when downloading from the calc --- usblinktreewidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usblinktreewidget.cpp b/usblinktreewidget.cpp index 4ec58e47..f9af894c 100644 --- a/usblinktreewidget.cpp +++ b/usblinktreewidget.cpp @@ -296,7 +296,7 @@ void USBLinkTreeWidget::downloadEntry() || context_menu_item->data(0, Qt::UserRole).toBool()) // Is a directory return; - QString dest = QFileDialog::getSaveFileName(this, tr("Chose save location"), QString(), tr("TNS file (*.tns)")); + QString dest = QFileDialog::getSaveFileName(this, tr("Chose save location"), context_menu_item->data(0, Qt::DisplayRole).toString(), tr("TNS file (*.tns)")); if(!dest.isEmpty()) usblink_queue_download(usblink_path_item(context_menu_item).toStdString(), dest.toStdString(), usblink_download_callback, this); }