Code

fixing misspelled name in copyright notice
[inkscape.git] / src / dialogs / xml-tree.cpp
index 079a09b5a23d120c32721e9c967682be7dab9e88..44426d9215a6843afb7c69eab88526d9fec691c4 100644 (file)
@@ -217,6 +217,10 @@ void sp_xml_tree_dialog()
             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 {
@@ -807,15 +811,11 @@ void set_dt_select(Inkscape::XML::Node *repr)
 
     blocked++;
     if ( object && in_dt_coordsys(*object)
-         && !( SP_IS_TSPAN(object)  ||
-               SP_IS_STRING(object) ||
-               SP_IS_ROOT(object)     ) )
+         && !(SP_IS_STRING(object) ||
+                SP_IS_ROOT(object)     ) )
     {
-            /* We cannot set selection to tspan, string, or root; failures and
-             * crashes will occur. */
-            /* TODO: when a tspan is highlighted, set selection to its parent
-             * text
-             */
+            /* We cannot set selection to root or string - they are not items and selection is not
+             * equipped to deal with them */
             selection->set(SP_ITEM(object));
     }
     blocked--;
@@ -917,6 +917,9 @@ static gboolean on_delete(GtkObject *object, GdkEvent *event, gpointer data)
     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);