]> git.saurik.com Git - wxWidgets.git/commitdiff
minor fix in wxHtmlWindow::CreateLayout
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 12 Aug 1999 13:37:02 +0000 (13:37 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 12 Aug 1999 13:37:02 +0000 (13:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/html/htmlwin.cpp

index a149ca56cbf83c359d7855d57760d3a05d551989..ebc7e3f2eb71742ede8ff1fcdd8489e17c5448c8 100644 (file)
@@ -259,17 +259,16 @@ void wxHtmlWindow::CreateLayout()
         SetScrollbars(1, 1, 0, ClientHeight * 2); // always on          
         GetClientSize(&ClientWidth, &ClientHeight);
         m_Cell -> Layout(ClientWidth);
-        GetClientSize(&ClientWidth, &ClientHeight);
-       if (ClientHeight < m_Cell -> GetHeight()) {
+       if (ClientHeight < m_Cell -> GetHeight()) {
             SetScrollbars(HTML_SCROLL_STEP, HTML_SCROLL_STEP,
                           m_Cell -> GetWidth() / HTML_SCROLL_STEP,
                           m_Cell -> GetHeight() / HTML_SCROLL_STEP
                           /*cheat: top-level frag is always container*/);
         }
-       else { /* we fit into window, no need for scrollbars */
-           SetScrollbars(1, 1, 0, 0); // disable...
-           m_Cell -> Layout(ClientWidth); // ...and relayout
-       }
+           else { /* we fit into window, no need for scrollbars */
+               SetScrollbars(1, 1, 0, 0); // disable...
+               m_Cell -> Layout(ClientWidth); // ...and relayout
+           }
     }
 }