Skip to content
  • Huon Imberger's avatar
    Fix SVGs overlapping selection rect in View compare mode · d5ab1869
    Huon Imberger authored
    Summary:
    Zooming an SVG in compare mode allowed the SVG to be painted outside its
    parent widget `SvgImageView`, effectively overlapping the selection rect
    which is drawn in `DocumentView::paint`. This patch clips all painting
    done by children of `AbstractImageView` to its own shape, therefore
    fixing the issue.
    
    Before:
    {F5790186, size=full}
    
    After:
    {F5790283, size=full}
    
    Test Plan:
    Open an SVG image in comparison mode.
    Zoom in enough so it fills the entire document view (and therefore
    can be panned).
    Image should not draw over the selection rectangle.
    
    Reviewers: #gwenview, rkflx
    
    Reviewed By: #gwenview, rkflx
    
    Subscribers: muhlenpfordt
    
    Differential Revision: https://phabricator.kde.org/D11942
    d5ab1869