Skip to content
  • Georges Basile Stavracas Neto's avatar
    canvas-view: change action states only when the value differs · 0ff112a5
    Georges Basile Stavracas Neto authored
    Commit bb884cb6 introduced the faulty behavior where
    NautilusCanvasView keeps scrolling back to the first
    selected item when selecting multiple items.
    
    Backtracing it, it was found out that the icon view
    was changing the "sort" state when selecting items,
    even if nothing actually changed, which triggers the
    sort action changed handler. The handler by itself
    was doing the right job by revealing the selection,
    and the issue was caused by calling it unnecessarily.
    
    Since we may have to update the action states for other
    reasons besidse real sort change, we must change the
    action state only when it makes sense, i.e. only when
    the states really change.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=748265
    0ff112a5