mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Printing: overwrite the old custom template file
Change the new file size after inserting the new template to overwrite the old one. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
05109b2d6c
commit
c56b1c1114
1 changed files with 1 additions and 0 deletions
|
@ -104,6 +104,7 @@ void TemplateLayout::writeTemplate(QString template_name, QString grantlee_templ
|
|||
QFile qfile(getSubsurfaceDataPath("printing_templates") + QDir::separator() + template_name);
|
||||
if (qfile.open(QFile::ReadWrite | QFile::Text)) {
|
||||
qfile.write(grantlee_template.toUtf8().data());
|
||||
qfile.resize(qfile.pos());
|
||||
qfile.close();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue