X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fdialogs%2Fxml-tree.cpp;h=44426d9215a6843afb7c69eab88526d9fec691c4;hb=ba1fe078a29408b11e40c5ad958786092d798aaf;hp=079a09b5a23d120c32721e9c967682be7dab9e88;hpb=6b15695578f07a3f72c4c9475c1a261a3021472a;p=inkscape.git diff --git a/src/dialogs/xml-tree.cpp b/src/dialogs/xml-tree.cpp index 079a09b5a..44426d921 100644 --- a/src/dialogs/xml-tree.cpp +++ b/src/dialogs/xml-tree.cpp @@ -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);