index 079a09b5a23d120c32721e9c967682be7dab9e88..44426d9215a6843afb7c69eab88526d9fec691c4 100644 (file)
--- a/src/dialogs/xml-tree.cpp
+++ b/src/dialogs/xml-tree.cpp
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 {
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--;
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);