[gimp] Issue #4968 - Newly opened image not visible in image window ...



commit 4e560f2ff030a20bada9c3ac5ad420935af51f80
Author: Ell <ell_se yahoo com>
Date:   Sun Apr 19 17:55:43 2020 +0300

    Issue #4968 - Newly opened image not visible in image window ...
    
    ... when rulers and scrollbars are hidden
    
    In gimp_display_shell_fill(), make sure a size-allocate always
    happens for the canvas, even when the rulers and scrollbars are
    hidden, so that the pending size_allocate_center_image is handled,
    and doesn't block canvas drawing.

 app/display/gimpdisplayshell.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index 71d30d3c98..ce4aa9a200 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -1476,10 +1476,11 @@ gimp_display_shell_fill (GimpDisplayShell *shell,
 
   gimp_statusbar_fill (GIMP_STATUSBAR (shell->statusbar));
 
-  /* A size-allocate will always occur because the scrollbars will
-   * become visible forcing the canvas to become smaller
+  /* make sure a size-allocate always occurs, even when the rulers and
+   * scrollbars are hidden.  see issue #4968.
    */
   shell->size_allocate_center_image = TRUE;
+  gtk_widget_queue_resize (GTK_WIDGET (shell->canvas));
 
   if (shell->blink_timeout_id)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]