Applied #10857 (wxGenericListCtrl does not recalculate positions on Thaw nor Update, preventing Refresh)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@62158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -136,8 +136,7 @@ public:
|
||||
bool ScrollList( int dx, int dy );
|
||||
bool SortItems( wxListCtrlCompare fn, long data );
|
||||
bool Update( long item );
|
||||
// Must provide overload to avoid hiding it (and warnings about it)
|
||||
virtual void Update() { wxControl::Update(); }
|
||||
virtual void Update();
|
||||
|
||||
// are we in report mode?
|
||||
bool InReportView() const { return HasFlag(wxLC_REPORT); }
|
||||
|
@@ -2732,7 +2732,10 @@ void wxListMainWindow::Thaw()
|
||||
wxCHECK_RET( m_freezeCount > 0, _T("thawing unfrozen list control?") );
|
||||
|
||||
if ( --m_freezeCount == 0 )
|
||||
Refresh();
|
||||
if (m_dirty)
|
||||
RecalculatePositions();
|
||||
else
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
@@ -5945,6 +5948,14 @@ void wxGenericListCtrl::Refresh(bool eraseBackground, const wxRect *rect)
|
||||
}
|
||||
}
|
||||
|
||||
void wxGenericListCtrl::Update()
|
||||
{
|
||||
if (m_mainWin && m_mainWin->m_dirty)
|
||||
m_mainWin->RecalculatePositions();
|
||||
|
||||
wxControl::Update();
|
||||
}
|
||||
|
||||
void wxGenericListCtrl::Freeze()
|
||||
{
|
||||
m_mainWin->Freeze();
|
||||
|
Reference in New Issue
Block a user