desktop/digikam/panorama_lastpage.patch

43 lines
1.8 KiB
Diff

From: Benjamin Girault <benjamin.girault@gmail.com>
Date: Sat, 19 Oct 2013 21:07:18 +0000
Subject: Panorama: bugfix lastpage
X-Git-Tag: v4.0.0-beta1
X-Git-Url: http://quickgit.kde.org/?p=kipi-plugins.git&a=commitdiff&h=3d1a27f97906dace0ef8ab33cf7642109088926a
---
Panorama: bugfix lastpage
Thanks to Pulfer for the bug report and "ROSA & OpenMandriva" for the patch is one is based on.
CCBUG: 324239
---
--- a/panorama/importwizard/lastpage.cpp
+++ b/panorama/importwizard/lastpage.cpp
@@ -91,11 +91,7 @@
QLabel *fileTemplateLabel = new QLabel(i18n("File name template:"), d->saveSettingsGroupBox);
formatVBox->addWidget(fileTemplateLabel);
- QString first = d->mngr->itemsList().front().fileName();
- QString last = d->mngr->itemsList().back().fileName();
-// QString file = "panorama";
- QString file = QString("%1-%2").arg(first.left(first.lastIndexOf('.'))).arg(last.left(last.lastIndexOf('.')));
- d->fileTemplateKLineEdit = new KLineEdit(file, d->saveSettingsGroupBox);
+ d->fileTemplateKLineEdit = new KLineEdit("panorama", d->saveSettingsGroupBox);
d->fileTemplateKLineEdit->setToolTip(i18n("Name of the panorama file (without its extension)."));
d->fileTemplateKLineEdit->setWhatsThis(i18n("<b>File name template</b>: Set here the base name of the files that "
"will be saved. For example, if your template is <i>panorama</i> and if "
@@ -146,6 +142,11 @@
void LastPage::resetTitle()
{
+ QString first = d->mngr->itemsList().front().fileName();
+ QString last = d->mngr->itemsList().back().fileName();
+ QString file = QString("%1-%2").arg(first.left(first.lastIndexOf('.'))).arg(last.left(last.lastIndexOf('.')));
+ d->fileTemplateKLineEdit->setText(file);
+
slotTemplateChanged(d->fileTemplateKLineEdit->text());
checkFiles();
}