diff options
| author | Markus Engel <markus.engel@tum.de> | 2012-08-21 12:41:57 +0000 |
|---|---|---|
| committer | Markus Engel <markus.engel@tum.de> | 2012-08-21 12:41:57 +0000 |
| commit | a6ee236472ac07f5719e41bc396163d485757dc6 (patch) | |
| tree | 4a5e56a8d30fd47cb056bff81627298928557b14 /src/sp-item.cpp | |
| parent | Added "virtual pad" to (diff) | |
| download | inkscape-a6ee236472ac07f5719e41bc396163d485757dc6.tar.gz inkscape-a6ee236472ac07f5719e41bc396163d485757dc6.zip | |
Fixed some virtual function calls in SPItem and SPUse that led to crashes as they were not implemented in the base class.
(bzr r11608.1.36)
Diffstat (limited to 'src/sp-item.cpp')
| -rw-r--r-- | src/sp-item.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/sp-item.cpp b/src/sp-item.cpp index e6cc563f6..ea78e2e99 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -1374,9 +1374,11 @@ void SPItem::adjust_livepatheffect (Geom::Affine const &postmul, bool set) } } -// CPPIFY:: make pure virtual +// CPPIFY:: make pure virtual? +// Not all SPItems must necessarily have a set transform method! Geom::Affine CItem::onSetTransform(Geom::Affine const &transform) { - throw; +// throw; + return transform; } /** @@ -1443,6 +1445,11 @@ void SPItem::doWriteTransform(Inkscape::XML::Node *repr, Geom::Affine const &tra gint preserve = prefs->getBool("/options/preservetransform/value", 0); Geom::Affine transform_attr (transform); + + // CPPIFY: check this code. + // If onSetTransform is not overridden, CItem::onSetTransform will return the transform it was given as a parameter. + // onSetTransform cannot be pure due to the fact that not all visible Items are transformable. + if ( // run the object's set_transform (i.e. embed transform) only if: !preserve && // user did not chose to preserve all transforms !clip_ref->getObject() && // the object does not have a clippath |
