remove OnSize handler which is in fact not needed now that width caching is
based on caching the client width changes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -92,7 +92,6 @@ public:
|
||||
void SetBorderY(int y);
|
||||
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnSize(wxSizeEvent& event);
|
||||
|
||||
void OnLeftDown(wxMouseEvent& event);
|
||||
void OnRightDown(wxMouseEvent& event);
|
||||
|
@@ -49,7 +49,6 @@
|
||||
|
||||
BEGIN_EVENT_TABLE(wxStatusBarGeneric, wxWindow)
|
||||
EVT_PAINT(wxStatusBarGeneric::OnPaint)
|
||||
EVT_SIZE(wxStatusBarGeneric::OnSize)
|
||||
EVT_LEFT_DOWN(wxStatusBarGeneric::OnLeftDown)
|
||||
EVT_RIGHT_DOWN(wxStatusBarGeneric::OnRightDown)
|
||||
EVT_SYS_COLOUR_CHANGED(wxStatusBarGeneric::OnSysColourChanged)
|
||||
@@ -299,10 +298,8 @@ bool wxStatusBarGeneric::GetFieldRect(int n, wxRect& rect) const
|
||||
GetClientSize(&width, &height);
|
||||
#endif
|
||||
|
||||
// we cache m_widthsAbs between calls normally but it's cleared when the
|
||||
// status widths change so recompute it if needed and also if client width
|
||||
// has changed to take into account the fact that derived OnSize is run
|
||||
// before cache has been cleared in own OnSize
|
||||
// we cache m_widthsAbs between calls and recompute it if client
|
||||
// width has changed (or when it is initially empty)
|
||||
if ( m_widthsAbs.IsEmpty() || (m_lastClientWidth != width) )
|
||||
{
|
||||
wxConstCast(this, wxStatusBarGeneric)->
|
||||
@@ -383,14 +380,6 @@ void wxStatusBarGeneric::SetMinHeight(int height)
|
||||
}
|
||||
}
|
||||
|
||||
void wxStatusBarGeneric::OnSize(wxSizeEvent& event)
|
||||
{
|
||||
// have to recompute the widths in pixels
|
||||
m_widthsAbs.Empty();
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void wxStatusBarGeneric::OnLeftDown(wxMouseEvent& event)
|
||||
{
|
||||
#ifdef __WXGTK20__
|
||||
|
Reference in New Issue
Block a user