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 SetBorderY(int y);
|
||||||
|
|
||||||
void OnPaint(wxPaintEvent& event);
|
void OnPaint(wxPaintEvent& event);
|
||||||
void OnSize(wxSizeEvent& event);
|
|
||||||
|
|
||||||
void OnLeftDown(wxMouseEvent& event);
|
void OnLeftDown(wxMouseEvent& event);
|
||||||
void OnRightDown(wxMouseEvent& event);
|
void OnRightDown(wxMouseEvent& event);
|
||||||
|
@@ -49,7 +49,6 @@
|
|||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxStatusBarGeneric, wxWindow)
|
BEGIN_EVENT_TABLE(wxStatusBarGeneric, wxWindow)
|
||||||
EVT_PAINT(wxStatusBarGeneric::OnPaint)
|
EVT_PAINT(wxStatusBarGeneric::OnPaint)
|
||||||
EVT_SIZE(wxStatusBarGeneric::OnSize)
|
|
||||||
EVT_LEFT_DOWN(wxStatusBarGeneric::OnLeftDown)
|
EVT_LEFT_DOWN(wxStatusBarGeneric::OnLeftDown)
|
||||||
EVT_RIGHT_DOWN(wxStatusBarGeneric::OnRightDown)
|
EVT_RIGHT_DOWN(wxStatusBarGeneric::OnRightDown)
|
||||||
EVT_SYS_COLOUR_CHANGED(wxStatusBarGeneric::OnSysColourChanged)
|
EVT_SYS_COLOUR_CHANGED(wxStatusBarGeneric::OnSysColourChanged)
|
||||||
@@ -299,10 +298,8 @@ bool wxStatusBarGeneric::GetFieldRect(int n, wxRect& rect) const
|
|||||||
GetClientSize(&width, &height);
|
GetClientSize(&width, &height);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// we cache m_widthsAbs between calls normally but it's cleared when the
|
// we cache m_widthsAbs between calls and recompute it if client
|
||||||
// status widths change so recompute it if needed and also if client width
|
// width has changed (or when it is initially empty)
|
||||||
// has changed to take into account the fact that derived OnSize is run
|
|
||||||
// before cache has been cleared in own OnSize
|
|
||||||
if ( m_widthsAbs.IsEmpty() || (m_lastClientWidth != width) )
|
if ( m_widthsAbs.IsEmpty() || (m_lastClientWidth != width) )
|
||||||
{
|
{
|
||||||
wxConstCast(this, wxStatusBarGeneric)->
|
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)
|
void wxStatusBarGeneric::OnLeftDown(wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
#ifdef __WXGTK20__
|
#ifdef __WXGTK20__
|
||||||
|
Reference in New Issue
Block a user