diff options
| author | Ted Gould <ted@gould.cx> | 2008-10-11 15:16:23 +0000 |
|---|---|---|
| committer | Ted Gould <ted@canonical.com> | 2008-10-11 15:16:23 +0000 |
| commit | 2f5eb047d9e05be5e68549ef6b75070d2faa7d2f (patch) | |
| tree | ca2e94164b6d7aaebfc17196ca46bfc825a7665a /src/widgets/desktop-widget.cpp | |
| parent | Merge from trunk. (diff) | |
| download | inkscape-2f5eb047d9e05be5e68549ef6b75070d2faa7d2f.tar.gz inkscape-2f5eb047d9e05be5e68549ef6b75070d2faa7d2f.zip | |
Merging from trunk
(bzr r6884)
Diffstat (limited to 'src/widgets/desktop-widget.cpp')
| -rw-r--r-- | src/widgets/desktop-widget.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index f7e2c3f27..e4190b930 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -1724,20 +1724,20 @@ sp_desktop_widget_update_scrollbars (SPDesktopWidget *dtw, double scale) /* The desktop region we always show unconditionally */ SPDocument *doc = dtw->desktop->doc(); - NR::Rect darea(Geom::Point(-sp_document_width(doc), -sp_document_height(doc)), - Geom::Point(2 * sp_document_width(doc), 2 * sp_document_height(doc))); - darea = NR::union_bounds(darea, sp_item_bbox_desktop(SP_ITEM(SP_DOCUMENT_ROOT(doc)))); + Geom::Rect darea ( Geom::Point(-sp_document_width(doc), -sp_document_height(doc)), + Geom::Point(2 * sp_document_width(doc), 2 * sp_document_height(doc)) ); + SPObject* root = doc->root; + SPItem* item = SP_ITEM(root); + boost::optional<Geom::Rect> deskarea = Geom::unify(darea, sp_item_bbox_desktop(item)); /* Canvas region we always show unconditionally */ - NR::Rect carea(Geom::Point(darea.min()[Geom::X] * scale - 64, - darea.max()[Geom::Y] * -scale - 64), - Geom::Point(darea.max()[Geom::X] * scale + 64, - darea.min()[Geom::Y] * -scale + 64)); + Geom::Rect carea( Geom::Point(deskarea->min()[Geom::X] * scale - 64, deskarea->max()[Geom::Y] * -scale - 64), + Geom::Point(deskarea->max()[Geom::X] * scale + 64, deskarea->min()[Geom::Y] * -scale + 64) ); Geom::Rect viewbox = dtw->canvas->getViewbox(); /* Viewbox is always included into scrollable region */ - carea = NR::union_bounds(carea, from_2geom(viewbox)); + carea = Geom::unify(carea, viewbox); set_adjustment(dtw->hadj, carea.min()[Geom::X], carea.max()[Geom::X], viewbox.dimensions()[Geom::X], |
