summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a846d9e)
raw | patch | inline | side by side (parent: a846d9e)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 28 Dec 2008 21:56:47 +0000 (21:56 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 28 Dec 2008 21:56:47 +0000 (21:56 +0000) |
src/ui/view/edit-widget.cpp | patch | blob | history |
index dd437aad836981a85d6435812d9d82f3cd97453b..5e9b44ff675081d51b1f62c74aad33566cce0574 100644 (file)
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()));