mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Print: remove the warning about editing bundled templates
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@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
894e7d5d39
commit
ff439396a5
1 changed files with 1 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue