diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-08-23 07:38:11 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-23 07:38:11 -0700 |
commit | 2f540b56a8e42c8a0722dec3676297024f31eb74 (patch) | |
tree | d5c34830520481fccef873a3cbc5b9f60aae8d07 /qt-ui/templateedit.cpp | |
parent | fbce8a0378f5ebcd36dbc08b3b5771ccf5cad830 (diff) | |
parent | cc864794753eb586e89470d87196e13568cb9031 (diff) | |
download | subsurface-2f540b56a8e42c8a0722dec3676297024f31eb74.tar.gz |
Merge branch 'custom-print' of github.com:neolit123/subsurface
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; |