]> granicus.if.org Git - handbrake/commitdiff
LinGui: fix initial preview scaling size
authorJohn Stebbins <jstebbins.hb@gmail.com>
Mon, 20 Jun 2016 14:40:24 +0000 (07:40 -0700)
committerJohn Stebbins <jstebbins.hb@gmail.com>
Mon, 20 Jun 2016 14:40:24 +0000 (07:40 -0700)
gtk/src/preview.c

index c41ebdf65117567d2e40acefd919ab992af34cd4..b10aaf09b8c29447160f3c365d0d4c4c39affc1f 100644 (file)
@@ -993,12 +993,12 @@ ghb_set_preview_image(signal_user_data_t *ud)
 void
 ghb_rescale_preview_image(signal_user_data_t *ud)
 {
+    init_preview_image(ud);
     if (ud->preview->width <= 0 || ud->preview->height <= 0)
     {
         return;
     }
     double scale = (double)ud->preview->render_width / ud->preview->width;
-    init_preview_image(ud);
     preview_set_render_size(ud, ud->preview->width * scale,
                                 ud->preview->height * scale);
 
@@ -1016,11 +1016,11 @@ ghb_rescale_preview_image(signal_user_data_t *ud)
 void
 ghb_reset_preview_image(signal_user_data_t *ud)
 {
+    init_preview_image(ud);
     if (ud->preview->width <= 0 || ud->preview->height <= 0)
     {
         return;
     }
-    init_preview_image(ud);
     preview_set_render_size(ud, ud->preview->width, ud->preview->height);
 
     // Scale and display the mini-preview