Commit e01b28d5 authored by Thomas Holder's avatar Thomas Holder

fix #682 unselect XML Editor on delete

parent 03063e0e
......@@ -511,7 +511,7 @@ void XmlTree::set_dt_select(Inkscape::XML::Node *repr)
* equipped to deal with them */
selection->set(SP_ITEM(object));
current_desktop->getDocument()->setXMLDialogSelectedObject(nullptr);
} else if (object && !current_desktop->isLayer(object)) {
} else if (!object || !current_desktop->isLayer(object)) {
current_desktop->getDocument()->setXMLDialogSelectedObject(object);
selection->clear();
}
......
......@@ -342,6 +342,7 @@ void element_child_removed(Inkscape::XML::Node *repr, Inkscape::XML::Node *child
// remove dummy when all children gone
(!repr->firstChild() && repr_to_child(data, nullptr, &iter))) {
gtk_tree_store_remove (GTK_TREE_STORE(data->tree->store), &iter);
gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(GTK_TREE_VIEW(data->tree)));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment