don't clear the list control when wxLC_[HV]RULES style is toggled (#4688)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-06-13 22:38:33 +00:00
parent 235cdc6dd7
commit b119ee87a5

View File

@@ -5088,8 +5088,18 @@ void wxGenericListCtrl::SetSingleStyle( long style, bool add )
else
flag &= ~style;
// some styles can be set without recreating everything (as happens in
// SetWindowStyleFlag() which calls wxListMainWindow::DeleteEverything())
if ( !(style & ~(wxLC_HRULES | wxLC_VRULES)) )
{
Refresh();
wxWindow::SetWindowStyleFlag(flag);
}
else
{
SetWindowStyleFlag( flag );
}
}
void wxGenericListCtrl::SetWindowStyleFlag( long flag )
{