Skip to content
  • Peter Mühlenpfordt's avatar
    Fix thumbnail bar update after editing a viewed image · e359ebf1
    Peter Mühlenpfordt authored
    Summary:
    After editing an image (e.g. rotate) a new thumbnail is created but
    it is not repainted in the View Mode thumbnail bar.
    The custom signals `documentChanged` and `busyStateChanged` provide
    a `QModelIndex` for the modified document but this is based on the
    source model and cannot be used in `ThumbnailBarView` where the list
    view is based on a filtered proxy model and the index is wrong or
    does not exist in some cases.
    This patch uses the QUrl as argument for both signals and gets the
    proper index for the current model in the receiver view.
    
    FIXED-IN: 18.04.0
    
    Test Plan:
    * Open image in Gwenview View Mode
    * Enable thumbnail bar ({key Ctrl B})
    * Edit image (e.g. rotate with {key Ctrl R})
    * Edit a second time (same or another image)
    * Thumbnail should always correspond to edited image
    
    Reviewers: #gwenview, rkflx
    
    Reviewed By: #gwenview, rkflx
    
    Subscribers: rkflx, huoni
    
    Differential Revision: https://phabricator.kde.org/D11714
    e359ebf1