Code

fix "Zoom when window is resized", got broken in rev 10439 (Bug #167651)
authorspeleo3 <speleo3@users.sourceforge.net>
Sat, 16 May 2009 11:58:51 +0000 (11:58 +0000)
committerspeleo3 <speleo3@users.sourceforge.net>
Sat, 16 May 2009 11:58:51 +0000 (11:58 +0000)
src/widgets/desktop-widget.cpp

index c2563b8db2d0f422e9501be72dbc8f37d6ca31d6..07a152aad3a5b45af3b22a38640cc3f8255a82c2 100644 (file)
@@ -662,10 +662,8 @@ sp_desktop_widget_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
             Geom::Rect newarea = dtw->desktop->get_display_area();
             /* Calculate adjusted zoom */
             zoom = zpsp * hypot(newarea.dimensions()[Geom::X], newarea.dimensions()[Geom::Y]);
-            dtw->desktop->zoom_absolute(newarea.midpoint()[Geom::X], newarea.midpoint()[Geom::Y], zoom);
-        } else {
-            dtw->desktop->zoom_absolute(area.midpoint()[Geom::X], area.midpoint()[Geom::Y], zoom);
         }
+        dtw->desktop->zoom_absolute(area.midpoint()[Geom::X], area.midpoint()[Geom::Y], zoom);
 
     } else {
         if (GTK_WIDGET_CLASS (dtw_parent_class)->size_allocate) {