summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-10-30 22:38:59 +0000
committerNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-10-30 22:44:08 +0000
commitbbd8b0f98d6e24e18f7bede94bf549ed126b9cd4 (patch)
tree84689ce02fd27ea1840f8e636ece63dbb12ba9ce /src
parentCMake: enable -fstack-protector-strong by default (diff)
downloadinkscape-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.cpp5
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;
}