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 ScrollList( int dx, int dy );
|
||||||
bool SortItems( wxListCtrlCompare fn, long data );
|
bool SortItems( wxListCtrlCompare fn, long data );
|
||||||
bool Update( long item );
|
bool Update( long item );
|
||||||
// Must provide overload to avoid hiding it (and warnings about it)
|
virtual void Update();
|
||||||
virtual void Update() { wxControl::Update(); }
|
|
||||||
|
|
||||||
// are we in report mode?
|
// are we in report mode?
|
||||||
bool InReportView() const { return HasFlag(wxLC_REPORT); }
|
bool InReportView() const { return HasFlag(wxLC_REPORT); }
|
||||||
|
@@ -2732,6 +2732,9 @@ void wxListMainWindow::Thaw()
|
|||||||
wxCHECK_RET( m_freezeCount > 0, _T("thawing unfrozen list control?") );
|
wxCHECK_RET( m_freezeCount > 0, _T("thawing unfrozen list control?") );
|
||||||
|
|
||||||
if ( --m_freezeCount == 0 )
|
if ( --m_freezeCount == 0 )
|
||||||
|
if (m_dirty)
|
||||||
|
RecalculatePositions();
|
||||||
|
else
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -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()
|
void wxGenericListCtrl::Freeze()
|
||||||
{
|
{
|
||||||
m_mainWin->Freeze();
|
m_mainWin->Freeze();
|
||||||
|
Reference in New Issue
Block a user