X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fworkarea.cpp;h=c940d86c9cdf1d22b3868227ba94c77844f7f835;hb=3624aac2a6e2dc3824ae22e99e2608f93f285e61;hp=72acd9040c0608fd0c83dd3867d09ab965035bfb;hpb=536bceae2dd6a33168fb41511d5263b697d2d32f;p=synfig.git 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);