diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index d89a85eaa58a36c0e3b8a252f5f786ee0e42453f..cdd356871c80d5d840c695a3d05b199ac28c297a 100644 (file)
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
if (object && SP_IS_ITEM(object)) {
/* Find bbox in document */
Geom::Matrix const i2doc(sp_item_i2doc_affine(SP_ITEM(object)));
- NR::Maybe<Geom::Rect> dbox = SP_ITEM(object)->getBounds(i2doc);
+ boost::optional<NR::Rect> nrdbox = SP_ITEM(object)->getBounds(i2doc);
+ boost::optional<Geom::Rect> dbox;
+ if (nrdbox) {
+ dbox = to_2geom(*nrdbox);
+ }
if ( SP_OBJECT_PARENT(object) == NULL )
{
NRGC gc(NULL);
/* Update to renderable state */
double sf = 1.0;
- nr_arena_item_set_transform(root, from_2geom(Geom::Scale(sf, sf)));
+ nr_arena_item_set_transform(root, (Geom::Matrix)Geom::Scale(sf, sf));
gc.transform.set_identity();
nr_arena_item_invoke_update( root, NULL, &gc,
NR_ARENA_ITEM_STATE_ALL,
}
sf = (double)psize / (double)block;
- nr_arena_item_set_transform(root, from_2geom(Geom::Scale(sf, sf)));
+ nr_arena_item_set_transform(root, (Geom::Matrix)Geom::Scale(sf, sf));
gc.transform.set_identity();
nr_arena_item_invoke_update( root, NULL, &gc,
NR_ARENA_ITEM_STATE_ALL,