summaryrefslogtreecommitdiffstats
path: root/qt-ui/printoptions.h
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2015-07-11 01:06:43 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-07-20 15:28:07 +0300
commit7ca311ae859199f1e07279bf78e1c36efc97768c (patch)
tree97ae2718b5fcfe7a4e7b4c4018a0911c0d5e223a /qt-ui/printoptions.h
parentd4382c7c4b802b030bab5e64de4b1641f603d543 (diff)
downloadsubsurface-7ca311ae859199f1e07279bf78e1c36efc97768c.tar.gz
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>
Diffstat (limited to 'qt-ui/printoptions.h')
-rw-r--r--qt-ui/printoptions.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/printoptions.h b/qt-ui/printoptions.h
index d96b27a53..3a5c2b179 100644
--- a/qt-ui/printoptions.h
+++ b/qt-ui/printoptions.h
@@ -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