Fix reloading of SVG images
Summary: If an SVG image is reloaded ({key F5} or {nav File > Reload}) the `QSvgRenderer` is not updated after loading and Gwenview crashes when trying to zoom. If the SVG file is changed outside Gwenview while it is viewed and then reloaded it's not updated. This is caused by a missing connection to the `loaded()` signal and calling `SvgImageView::finishLoadFromDocument()` to setup the new renderer. BUG: 359736 FIXED-IN: 18.04.1 Test Plan: 1. Open SVG image in View Mode 2. Press {key F5} to reload 3. Zoom by mouse scroll or moving the slider 4. Gwenview should not crash 1. Open SVG image in View Mode 2. Overwrite viewed file with another SVG outside Gwenview 3. Press {key F5} to reload 4. New image should display Reviewers: #gwenview, rkflx Reviewed By: #gwenview, rkflx Subscribers: rkflx, huoni Differential Revision: https://phabricator.kde.org/D12187
parent
aeeb5d46
Please register or sign in to comment