From 7696129a2c95a826d8ce0f582875c32123006226 Mon Sep 17 00:00:00 2001 From: johanengelen Date: Sun, 28 Dec 2008 21:56:47 +0000 Subject: [PATCH] convert NR to Geom --- src/ui/view/edit-widget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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())); -- 2.30.2