Printing: clear all templates before insterting the new templates

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
Gehad elrobey 2015-07-26 15:58:00 +02:00 committed by Lubomir I. Ivanov
parent 1dd2518624
commit 858796af09

View file

@ -23,6 +23,7 @@ int getTotalWork(print_options *printOptions)
void find_all_templates()
{
grantlee_templates.clear();
QDir dir(getSubsurfaceDataPath("printing_templates"));
QFileInfoList list = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot);
foreach (QFileInfo finfo, list) {