summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorRalf Stephan <ralf@ark.in-berlin.de>2006-02-24 18:06:37 +0000
committerrwst <rwst@users.sourceforge.net>2006-02-24 18:06:37 +0000
commit042242974a1cbd778129ed03f6ad910ac3c07583 (patch)
treec84953c6dbdd5717dee95660d48ec45b7c46af22 /src/ui
parentincluding typecheck trying to prevent #1432680 (diff)
downloadinkscape-042242974a1cbd778129ed03f6ad910ac3c07583.tar.gz
inkscape-042242974a1cbd778129ed03f6ad910ac3c07583.zip
make sure no negative dialog position is written into preferences,
part of fix for #1290647 (bzr r178)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/dialog.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/dialog/dialog.cpp b/src/ui/dialog/dialog.cpp
index b4e491bf9..84e69ee24 100644
--- a/src/ui/dialog/dialog.cpp
+++ b/src/ui/dialog/dialog.cpp
@@ -76,6 +76,9 @@ Dialog::save_geometry()
// g_print ("write %d %d %d %d\n", x, y, w, h);
+ if (x<0) x=0;
+ if (y<0) y=0;
+
prefs_set_int_attribute (_prefs_path, "x", x);
prefs_set_int_attribute (_prefs_path, "y", y);
prefs_set_int_attribute (_prefs_path, "w", w);