Fix switching to report view using SetWindowStyleFlag()

Closes #17059.
Closes https://github.com/wxWidgets/wxWidgets/pull/425.
This commit is contained in:
Catalin 2017-05-18 23:39:01 +02:00 committed by Artur Wieczorek
parent 2893f894ab
commit a647b6da72

View File

@ -502,10 +502,17 @@ void wxListCtrl::SetWindowStyleFlag(long flag)
{
if ( flag != m_windowStyle )
{
const bool wasInReportView = InReportView();
wxListCtrlBase::SetWindowStyleFlag(flag);
UpdateStyle();
// if we switched to the report view, set the extended styles for
// it too
if ( !wasInReportView && InReportView() )
MSWSetExListStyles();
Refresh();
}
}