From: johanengelen Date: Sun, 28 Dec 2008 21:56:47 +0000 (+0000) Subject: convert NR to Geom X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7696129a2c95a826d8ce0f582875c32123006226;p=inkscape.git convert NR to Geom --- diff --git a/src/ui/view/edit-widget.cpp b/src/ui/view/edit-widget.cpp index dd437aad8..5e9b44ff6 100644 --- a/src/ui/view/edit-widget.cpp +++ b/src/ui/view/edit-widget.cpp @@ -1664,13 +1664,13 @@ EditWidget::onWindowSizeAllocate (Gtk::Allocation &newall) void EditWidget::onWindowRealize() { - NR::Rect d( Geom::Point(0, 0), - Geom::Point(sp_document_width(_desktop->doc()), sp_document_height(_desktop->doc())) ); - - if (d.isEmpty(1.0)) { + if ( (sp_document_width(_desktop->doc()) < 1.0) || (sp_document_height(_desktop->doc()) < 1.0) ) { return; } + Geom::Rect d( Geom::Point(0, 0), + Geom::Point(sp_document_width(_desktop->doc()), sp_document_height(_desktop->doc())) ); + _desktop->set_display_area(d.min()[Geom::X], d.min()[Geom::Y], d.max()[Geom::X], d.max()[Geom::Y], 10); _namedview_modified(_desktop->namedview, SP_OBJECT_MODIFIED_FLAG); setTitle (SP_DOCUMENT_NAME(_desktop->doc()));