diff --git a/viewer/windows/JFJochProcessingJobsWindow.cpp b/viewer/windows/JFJochProcessingJobsWindow.cpp index 73bb0a80..375809a2 100644 --- a/viewer/windows/JFJochProcessingJobsWindow.cpp +++ b/viewer/windows/JFJochProcessingJobsWindow.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -157,6 +158,24 @@ int JFJochProcessingJobsWindow::askJob(const ReprocessingInputs &inputs, JobSpec QStringLiteral("%1/%2_run%3").arg(fi.absolutePath(), stem).arg(job_counter_ + 1)); auto *prefix = new QLineEdit(default_prefix, &dlg); + // "Browse…" opens a file dialog to choose where the outputs go. The chosen name is used as a prefix + // (suffixes like _process.h5 / .cif are appended), so drop a trailing extension. + auto *browse = new QPushButton("Browse…", &dlg); + connect(browse, &QPushButton::clicked, &dlg, [&dlg, prefix] { + const QString sel = QFileDialog::getSaveFileName(&dlg, "Output file prefix", prefix->text(), + "All Files (*)", nullptr, + QFileDialog::DontConfirmOverwrite); + if (sel.isEmpty()) + return; + const QFileInfo pf(sel); + prefix->setText(QDir::toNativeSeparators(pf.dir().filePath(pf.completeBaseName()))); + }); + auto *prefixRow = new QWidget(&dlg); + auto *prefixRowLayout = new QHBoxLayout(prefixRow); + prefixRowLayout->setContentsMargins(0, 0, 0, 0); + prefixRowLayout->addWidget(prefix); + prefixRowLayout->addWidget(browse); + // Rotation-vs-stills mode (rotation indexing + partiality + rot3d) is set in the settings panel via // "Process as stills"; the dialog only collects run options. Scaling applies to MX full analysis. auto *scaling = new QCheckBox("Scale && merge", &dlg); @@ -169,7 +188,7 @@ int JFJochProcessingJobsWindow::askJob(const ReprocessingInputs &inputs, JobSpec form->addRow("Threads", threads); form->addRow(save_h5); form->addRow(save_merged); - form->addRow("Output prefix", prefix); + form->addRow("Output prefix", prefixRow); form->addRow(scaling); int result = 0;