From 587e0c67829259c68fac020ffc3b43fba965a836 Mon Sep 17 00:00:00 2001 From: Scott Gilbertson Date: Sat, 6 Jan 2024 16:32:14 -0500 Subject: [PATCH] Simplified BatchQueue::updateDestinationPathPreview after noticing that calcAutoFileNameBase handles all cases --- rtgui/batchqueue.cc | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index 8d2ad176e..27b4400e1 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -575,24 +575,7 @@ void BatchQueue::updateDestinationPathPreview() { auto &entry = *selected.at(0); int sequence = 0; // Sequence during subsequent queue processing can't be determined here - Glib::ustring baseDestination; - if (options.saveUsePathTemplate) - { - baseDestination = calcAutoFileNameBase(entry.filename, sequence); - } - else - { - Glib::ustring baseFilename; - int extpos = entry.filename.size() - 1; - for (; extpos >= 0 && entry.filename[extpos] != '.'; extpos--) - { - } - for (int k = extpos - 1; k >= 0 && entry.filename[k] != '/' && entry.filename[k] != '\\'; k--) - { - baseFilename = entry.filename[k] + baseFilename; - } - baseDestination = options.savePathFolder + '/' + baseFilename; - } + Glib::ustring baseDestination = calcAutoFileNameBase(entry.filename, sequence); Glib::ustring destination = Glib::ustring::compose ("%1.%2", baseDestination, options.saveFormatBatch.format); if (listener)