X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6becba596c63de98a5814baf000684bc96a404a..dd9ea234f2e8802e182194bfe375079d1bdd1ccf:/src/msw/tbar95.cpp diff --git a/src/msw/tbar95.cpp b/src/msw/tbar95.cpp index 49667ebabe..754543b932 100644 --- a/src/msw/tbar95.cpp +++ b/src/msw/tbar95.cpp @@ -17,10 +17,6 @@ // headers // ---------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "tbar95.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -603,7 +599,8 @@ bool wxToolBar::Realize() sizeBmp.x = m_defaultWidth; sizeBmp.y = m_defaultHeight; - const wxCoord totalBitmapWidth = m_defaultWidth * nTools, + const wxCoord totalBitmapWidth = m_defaultWidth * + wx_truncate_cast(wxCoord, nTools), totalBitmapHeight = m_defaultHeight; // Create a bitmap and copy all the tool bitmaps to it @@ -1071,6 +1068,8 @@ bool wxToolBar::Realize() } InvalidateBestSize(); + SetBestFittingSize(); + return true; }