Code

Separate NRRect and NR::Rect a bit further; the goal is to get to the point where...
[inkscape.git] / src / selection.cpp
index 82c82b5232c8053dd4eba0f5a0615580b8a0b636..5c60e5f41e76652079dab454d900d697e5583815 100644 (file)
@@ -354,7 +354,13 @@ NRRect *Selection::boundsInDocument(NRRect *bbox) const {
 
 NR::Rect Selection::boundsInDocument() const {
     NRRect r;
-    return NR::Rect(*boundsInDocument(&r));
+    NR::Maybe<NR::Rect> rect(boundsInDocument(&r)->upgrade());
+    if (rect) {
+        return *rect;
+    } else {
+        // FIXME
+        return NR::Rect(NR::Point(0, 0), NR::Point(0, 0));
+    }
 }
 
 /** Extract the position of the center from the first selected object */