Code

Disable the page selector when there's only one page
[inkscape.git] / src / libnr / nr-rect-l.cpp
index 40db67a1edfdb2f30ae2b2581c8f56777ecf3705..3b00acd0392123ea8056622c2c8c7bbf409e5721 100644 (file)
@@ -1,5 +1,13 @@
 #include <libnr/nr-rect-l.h>
 
+NR::Maybe<NR::Rect> NRRectL::upgrade() const {
+    if (nr_rect_l_test_empty(this)) {
+        return NR::Nothing();
+    } else {
+        return NR::Rect(NR::Point(x0, y0), NR::Point(x1, y1));
+    }
+}
+
 namespace NR {
 
 IRect::IRect(Rect const &r) :