Fix switching to report view using SetWindowStyleFlag()
Closes #17059. Closes https://github.com/wxWidgets/wxWidgets/pull/425.
This commit is contained in:
@@ -502,10 +502,17 @@ void wxListCtrl::SetWindowStyleFlag(long flag)
|
|||||||
{
|
{
|
||||||
if ( flag != m_windowStyle )
|
if ( flag != m_windowStyle )
|
||||||
{
|
{
|
||||||
|
const bool wasInReportView = InReportView();
|
||||||
|
|
||||||
wxListCtrlBase::SetWindowStyleFlag(flag);
|
wxListCtrlBase::SetWindowStyleFlag(flag);
|
||||||
|
|
||||||
UpdateStyle();
|
UpdateStyle();
|
||||||
|
|
||||||
|
// if we switched to the report view, set the extended styles for
|
||||||
|
// it too
|
||||||
|
if ( !wasInReportView && InReportView() )
|
||||||
|
MSWSetExListStyles();
|
||||||
|
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user