]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
moving string conversions at one place
[wxWidgets.git] / src / common / wincmn.cpp
index f894eed0732ab7ed90421b6b7895f1a8d40302c8..65d02ccc85920b0fa2d07eaaa038a1215fa64dc8 100644 (file)
@@ -634,12 +634,8 @@ wxSize wxWindowBase::DoGetVirtualSize() const
 {
     wxSize  s( GetClientSize() );
 
-    if( m_virtualSize.GetWidth() != -1 )
-        s.SetWidth( m_virtualSize.GetWidth() );
-    if( m_virtualSize.GetHeight() != -1 )
-        s.SetHeight( m_virtualSize.GetHeight() );
-
-    return s;
+    return wxSize( wxMax( m_virtualSize.GetWidth(), s.GetWidth() ),
+                   wxMax( m_virtualSize.GetHeight(), s.GetHeight() ) );
 }
 
 // ----------------------------------------------------------------------------
@@ -1177,7 +1173,9 @@ bool wxWindowBase::TransferDataToWindow()
         if ( validator && !validator->TransferToWindow() )
         {
             wxLogWarning(_("Could not transfer data to window"));
+#if wxUSE_LOG
             wxLog::FlushActive();
+#endif // wxUSE_LOG
 
             return FALSE;
         }