diff options
Diffstat (limited to 'qt-ui/templateedit.cpp')
-rw-r--r-- | qt-ui/templateedit.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qt-ui/templateedit.cpp b/qt-ui/templateedit.cpp index e4e6453ac..b50338090 100644 --- a/qt-ui/templateedit.cpp +++ b/qt-ui/templateedit.cpp @@ -35,6 +35,9 @@ TemplateEdit::TemplateEdit(QWidget *parent, struct print_options *printOptions, ui->plainTextEdit->setPlainText(grantlee_template); editingCustomColors = false; + if (printOptions->type == print_options::STATISTICS) { + ui->plainTextEdit->setEnabled(false); + } updatePreview(); } @@ -125,8 +128,8 @@ void TemplateEdit::saveSettings() if (msgBox.exec() == QMessageBox::Save) { memcpy(templateOptions, &newTemplateOptions, sizeof(struct template_options)); if (grantlee_template.compare(ui->plainTextEdit->toPlainText())) { - printOptions->p_template = "custom.html"; - TemplateLayout::writeTemplate("custom.html", ui->plainTextEdit->toPlainText()); + printOptions->p_template = "Custom.html"; + TemplateLayout::writeTemplate("Custom.html", ui->plainTextEdit->toPlainText()); } if (templateOptions->color_palette_index == CUSTOM) { custom_colors = templateOptions->color_palette; |