Code

init matrix variable, removes compiler warnings
[inkscape.git] / src / widgets / gradient-vector.cpp
index ccb36a3ec6bc0798787de7dc020249e5f9727fb8..5befb11d03c774ddaf16e2885324b212fce1fba2 100644 (file)
@@ -393,7 +393,7 @@ sp_gvs_defs_modified (SPObject *defs, guint flags, SPGradientVectorSelector *gvs
 #include "../widgets/sp-color-preview.h"
 #include "../widgets/widget-sizes.h"
 #include "../xml/node-event-vector.h"
-#include "../svg/svg.h"
+#include "../svg/svg-color.h"
 
 
 #define PAD 4
@@ -878,6 +878,10 @@ sp_gradient_vector_editor_new (SPGradient *gradient, SPStop *stop)
                        w = prefs_get_int_attribute (prefs_path, "w", 0);
                        h = prefs_get_int_attribute (prefs_path, "h", 0);
                }
+
+                if (x<0) x=0;
+                if (y<0) y=0;
+
                if (x != 0 || y != 0)
                        gtk_window_move ((GtkWindow *) dlg, x, y);
                else
@@ -994,6 +998,9 @@ sp_gradient_vector_dialog_delete (GtkWidget *widget, GdkEvent *event, GtkWidget
        gtk_window_get_position ((GtkWindow *) dlg, &x, &y);
        gtk_window_get_size ((GtkWindow *) dlg, &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);