Refresh wxListCtrl with wxLC_HRULES in SetColumnWidth() in wxMSW
This is necessary to avoid corrupted rules display after changing the column width. See #17158.
This commit is contained in:
committed by
Vadim Zeitlin
parent
d72006f5b8
commit
02c8973a57
@@ -623,7 +623,15 @@ bool wxListCtrl::SetColumnWidth(int col, int width)
|
|||||||
else if ( width == wxLIST_AUTOSIZE_USEHEADER)
|
else if ( width == wxLIST_AUTOSIZE_USEHEADER)
|
||||||
width = LVSCW_AUTOSIZE_USEHEADER;
|
width = LVSCW_AUTOSIZE_USEHEADER;
|
||||||
|
|
||||||
return ListView_SetColumnWidth(GetHwnd(), col, width) != 0;
|
if ( !ListView_SetColumnWidth(GetHwnd(), col, width) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Failure to explicitly refresh the control with horizontal rules results
|
||||||
|
// in corrupted rules display.
|
||||||
|
if ( HasFlag(wxLC_HRULES) )
|
||||||
|
Refresh();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user