summaryrefslogtreecommitdiffstats
path: root/qt-ui/templateedit.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-23 07:38:11 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-23 07:38:11 -0700
commit2f540b56a8e42c8a0722dec3676297024f31eb74 (patch)
treed5c34830520481fccef873a3cbc5b9f60aae8d07 /qt-ui/templateedit.cpp
parentfbce8a0378f5ebcd36dbc08b3b5771ccf5cad830 (diff)
parentcc864794753eb586e89470d87196e13568cb9031 (diff)
downloadsubsurface-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.cpp7
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;