mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-06 02:39:36 +00:00
app: don't let gtk_tree_store_clear() mess with our selected item
gimp_container_tree_view_clear_items(): GTK+ 3.x always keeps the row with the cursor selected, so we get a gazillion selection changed during gtk_tree_store_clear(), block our selection changed handler during the clear.
This commit is contained in:
parent
1b1739bb06
commit
3f954350d9
1 changed files with 11 additions and 0 deletions
|
@ -922,8 +922,19 @@ gimp_container_tree_view_clear_items (GimpContainerView *view)
|
|||
{
|
||||
GimpContainerTreeView *tree_view = GIMP_CONTAINER_TREE_VIEW (view);
|
||||
|
||||
/* GTK+ 3.x always keeps the row with the cursor selected, so we get
|
||||
* a gazillion selection changed during gtk_tree_store_clear()
|
||||
*/
|
||||
g_signal_handlers_block_by_func (tree_view->priv->selection,
|
||||
gimp_container_tree_view_selection_changed,
|
||||
tree_view);
|
||||
|
||||
gimp_container_tree_store_clear_items (GIMP_CONTAINER_TREE_STORE (tree_view->model));
|
||||
|
||||
g_signal_handlers_unblock_by_func (tree_view->priv->selection,
|
||||
gimp_container_tree_view_selection_changed,
|
||||
tree_view);
|
||||
|
||||
parent_view_iface->clear_items (view);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue