Skip to content
Commit f11f5a43 authored by Peter Mühlenpfordt's avatar Peter Mühlenpfordt
Browse files

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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment