From f2c6e895ebd5086017a468268eb4aea0469e125b Mon Sep 17 00:00:00 2001 From: dooglus Date: Thu, 31 Jan 2008 17:09:27 +0000 Subject: [PATCH] Partially revert the previous commit. Messing with the canvas size causes the display to be cleared between refreshes. git-svn-id: http://svn.voria.com/code@1539 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/workarea.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/workarea.cpp b/synfig-studio/trunk/src/gtkmm/workarea.cpp index 72acd90..c940d86 100644 --- a/synfig-studio/trunk/src/gtkmm/workarea.cpp +++ b/synfig-studio/trunk/src/gtkmm/workarea.cpp @@ -2256,12 +2256,10 @@ studio::WorkArea::async_update_preview() int w=(int)(desc.get_w()*zoom); int h=(int)(desc.get_h()*zoom); - // ensure that the size we draw is a whole number of pixels in each dimension - if (low_resolution) - { - if (w % low_res_pixel_size) w = (w/low_res_pixel_size+1)*low_res_pixel_size; - if (h % low_res_pixel_size) h = (h/low_res_pixel_size+1)*low_res_pixel_size; - } + // ensure that the size we draw is at least one pixel in each dimension + int min_size = low_resolution ? low_res_pixel_size : 1; + if (w < min_size) w = min_size; + if (h < min_size) h = min_size; // Setup the description parameters desc.set_antialias(1); -- 2.7.4