summaryrefslogtreecommitdiffstats
path: root/src/widgets/icon.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-07-25 01:06:47 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-07-25 01:06:47 +0000
commit4f3cc7cbb73a72e1ab10a587a3b81f8c8737fec3 (patch)
tree75853d8eec5e85fb93a2a798b57f072e3c9eeb99 /src/widgets/icon.cpp
parentReplace direct use of Cairo contexts and surfaces in the rendering tree (diff)
parentRevert workarounds from 10501 - no longer necessary (diff)
downloadinkscape-4f3cc7cbb73a72e1ab10a587a3b81f8c8737fec3.tar.gz
inkscape-4f3cc7cbb73a72e1ab10a587a3b81f8c8737fec3.zip
Merge from trunk
(bzr r10347.1.18)
Diffstat (limited to 'src/widgets/icon.cpp')
-rw-r--r--src/widgets/icon.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index bb2029bcf..c6823e2d8 100644
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
@@ -35,6 +35,7 @@
#include "display/nr-arena.h"
#include "display/nr-arena-item.h"
#include "io/sys.h"
+#include "sp-root.h"
#include "icon.h"
@@ -1099,9 +1100,10 @@ sp_icon_doc_icon( SPDocument *doc, NRArenaItem *root,
if (doc) {
SPObject *object = doc->getObjectById(name);
if (object && SP_IS_ITEM(object)) {
- /* Find bbox in document */
- Geom::Affine const i2doc(SP_ITEM(object)->i2doc_affine());
- Geom::OptRect dbox = SP_ITEM(object)->getBounds(i2doc);
+ SPItem *item = SP_ITEM(object);
+ // Find bbox in document
+ Geom::Affine const i2doc(item->i2doc_affine());
+ Geom::OptRect dbox = item->getBounds(i2doc);
if ( object->parent == NULL )
{
@@ -1292,7 +1294,7 @@ guchar *IconImpl::load_svg_pixels(std::list<Glib::ustring> const &names,
// fixme: Memory manage root if needed (Lauris)
// This needs to be fixed indeed; this leads to a memory leak of a few megabytes these days
// because shapes are being rendered which are not being freed
- NRArenaItem *root = SP_ITEM(doc->getRoot())->invoke_show( arena, visionkey, SP_ITEM_SHOW_DISPLAY );
+ NRArenaItem *root = doc->getRoot()->invoke_show( arena, visionkey, SP_ITEM_SHOW_DISPLAY );
// store into the cache
info = new SVGDocCache(doc, root);