diff options
| author | Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> | 2019-10-30 22:38:59 +0000 |
|---|---|---|
| committer | Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> | 2019-10-30 22:44:08 +0000 |
| commit | bbd8b0f98d6e24e18f7bede94bf549ed126b9cd4 (patch) | |
| tree | 84689ce02fd27ea1840f8e636ece63dbb12ba9ce /src | |
| parent | CMake: enable -fstack-protector-strong by default (diff) | |
| download | inkscape-bbd8b0f98d6e24e18f7bede94bf549ed126b9cd4.tar.gz inkscape-bbd8b0f98d6e24e18f7bede94bf549ed126b9cd4.zip | |
Fix initial transform of shape in opened file.
Fix https://gitlab.com/inkscape/inkscape/issues/495
and likely other problems.
Diffstat (limited to 'src')
| -rw-r--r-- | src/object/sp-shape.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/object/sp-shape.cpp b/src/object/sp-shape.cpp index c186b176c..be68aae1f 100644 --- a/src/object/sp-shape.cpp +++ b/src/object/sp-shape.cpp @@ -467,7 +467,10 @@ Geom::OptRect SPShape::bbox(Geom::Affine const &transform, SPItem::BBoxType bbox // the cache doesn't get called if the object is moved, so we need // to compare the transformations as well. bool cached = (bboxtype == SPItem::VISUAL_BBOX) ? bbox_vis_cache_is_valid : bbox_geom_cache_is_valid; - if (cached && transform == bbox_transform_cache) { + if (transform != bbox_transform_cache) { + bbox_vis_cache_is_valid = false; + bbox_geom_cache_is_valid = false; + } else if (cached) { return (bboxtype == SPItem::VISUAL_BBOX) ? bbox_vis_cache : bbox_geom_cache; } |
