From d4867888572ff1cf3d5bbeaed8c68431f6834941 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Mon, 5 Mar 2007 05:50:20 +0000 Subject: Separate NRRect and NR::Rect a bit further; the goal is to get to the point where there is no way to create an empty NR::Rect (bzr r2551) --- src/selection.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/selection.cpp') diff --git a/src/selection.cpp b/src/selection.cpp index 82c82b523..5c60e5f41 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -354,7 +354,13 @@ NRRect *Selection::boundsInDocument(NRRect *bbox) const { NR::Rect Selection::boundsInDocument() const { NRRect r; - return NR::Rect(*boundsInDocument(&r)); + NR::Maybe 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 */ -- cgit v1.2.3