[PATCH 2/2] Print: remove the warning about editing bundled templates
Lubomir I. Ivanov
neolit123 at gmail.com
Sun Oct 18 14:25:15 PDT 2015
From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
Bundled templates can no longer be edited, because
copies are made in the user directory. The TemplateEdit
special case warning is no longer relevant so it can
be removed.
Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
qt-ui/templateedit.cpp | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/qt-ui/templateedit.cpp b/qt-ui/templateedit.cpp
index 8383004..4964016 100644
--- a/qt-ui/templateedit.cpp
+++ b/qt-ui/templateedit.cpp
@@ -128,19 +128,12 @@ void TemplateEdit::on_colorpalette_currentIndexChanged(int index)
void TemplateEdit::saveSettings()
{
- QStringList bundledTemplates;
- bundledTemplates << "Flowlayout.html" << "One Dive.html" << "Six Dives.html" << "Table.html" << "Two Dives.html";
if ((*templateOptions) != newTemplateOptions || grantlee_template.compare(ui->plainTextEdit->toPlainText())) {
QMessageBox msgBox(this);
QString message = tr("Do you want to save your changes?");
bool templateChanged = false;
- if (grantlee_template.compare(ui->plainTextEdit->toPlainText())) {
- if (bundledTemplates.contains(printOptions->p_template) || (printOptions->p_template == "Default.html" && printOptions->type == print_options::STATISTICS)) {
- msgBox.setIcon(QMessageBox::Warning);
- message = tr("You are about to modify a template bundled with Subsurface.\n") + message;
- }
+ if (grantlee_template.compare(ui->plainTextEdit->toPlainText()))
templateChanged = true;
- }
msgBox.setText(message);
msgBox.setStandardButtons(QMessageBox::Save | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Cancel);
--
1.7.11.msysgit.0
More information about the subsurface
mailing list