libreofficekit/source/gtk/lokdocview.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0478825ba51d390486bfbecb410bf9aaa3a3ff59
Author: Pranav Kant <[email protected]>
Date:   Tue Dec 15 00:23:46 2015 +0530

    lokdocview: Superfluous *_set_zoom() call on widget initialization
    
    G_PARAM_CONSTRUCT implies that parameter will be set upon widget
    initialization which means calling lok_doc_view_set_zoom() while
    document still points to null.
    
    Change-Id: Ib576ac3b32c2349be2b2df6067ae79a056a03028
    Reviewed-on: https://gerrit.libreoffice.org/20775
    Reviewed-by: David Tardon <[email protected]>
    Tested-by: David Tardon <[email protected]>
    (cherry picked from commit a2682e4b081a9a8c6814db768e4ee9e5390907ae)
    Reviewed-on: https://gerrit.libreoffice.org/21264
    Tested-by: Jenkins <[email protected]>
    Reviewed-by: Pranav Kant <[email protected]>

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index e6356d8..16e13e1 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -760,6 +760,7 @@ static gboolean postDocumentLoad(gpointer pData)
                                 nDocumentHeightPixels);
     gtk_widget_set_can_focus(GTK_WIDGET(pLOKDocView), TRUE);
     gtk_widget_grab_focus(GTK_WIDGET(pLOKDocView));
+    lok_doc_view_set_zoom(pLOKDocView, 1.0);
 
     return G_SOURCE_REMOVE;
 }
@@ -2143,7 +2144,6 @@ static void lok_doc_view_class_init (LOKDocViewClass* 
pClass)
                              "The current zoom level of the content",
                              0, 5.0, 1.0,
                              static_cast<GParamFlags>(G_PARAM_READWRITE |
-                                                      G_PARAM_CONSTRUCT |
                                                       
G_PARAM_STATIC_STRINGS)));
 
     /**
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to