diff options
| author | MenTaLguY <mental@rydia.net> | 2007-03-05 05:50:20 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2007-03-05 05:50:20 +0000 |
| commit | d4867888572ff1cf3d5bbeaed8c68431f6834941 (patch) | |
| tree | 95fbc8812495b00ce09c6f7dc46610eeba9fc9ca /src/selection.cpp | |
| parent | clean up operators/constructors, and give reference-maybes a more compact (diff) | |
| download | inkscape-d4867888572ff1cf3d5bbeaed8c68431f6834941.tar.gz inkscape-d4867888572ff1cf3d5bbeaed8c68431f6834941.zip | |
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)
Diffstat (limited to 'src/selection.cpp')
| -rw-r--r-- | src/selection.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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<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 */ |
