Printing: save only if data is changed in template_options

Check if data is changed before saving the new settings.

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-11 01:06:43 +02:00 committed by Lubomir I. Ivanov
parent d4382c7c4b
commit 7ca311ae85
3 changed files with 14 additions and 5 deletions

View file

@ -26,6 +26,12 @@ struct template_options {
int color_palette_index;
double font_size;
double line_spacing;
bool operator!=(const template_options &other) const {
return other.font_index != font_index
|| other.color_palette_index != color_palette_index
|| other.font_size != font_size
|| other.line_spacing != line_spacing;
}
};
// should be based on a custom QPrintDialog class