Merge branch 'dvc-col-update'
Avoid recursively updating wxHeaderColumns during resize in the generic wxDataViewCtrl implementation. See https://github.com/wxWidgets/wxWidgets/pull/1711
This commit is contained in:
@@ -204,6 +204,14 @@ int wxDataViewColumn::GetWidth() const
|
||||
}
|
||||
}
|
||||
|
||||
void wxDataViewColumn::WXOnResize(int width)
|
||||
{
|
||||
m_width =
|
||||
m_manuallySetWidth = width;
|
||||
|
||||
m_owner->OnColumnResized();
|
||||
}
|
||||
|
||||
void wxDataViewColumn::UpdateDisplay()
|
||||
{
|
||||
if (m_owner)
|
||||
@@ -401,8 +409,7 @@ private:
|
||||
wxDataViewCtrl * const owner = GetOwner();
|
||||
|
||||
const unsigned col = event.GetColumn();
|
||||
owner->GetColumn(col)->SetWidth(event.GetWidth());
|
||||
GetOwner()->OnColumnChange(col);
|
||||
owner->GetColumn(col)->WXOnResize(event.GetWidth());
|
||||
}
|
||||
|
||||
void OnEndReorder(wxHeaderCtrlEvent& event)
|
||||
@@ -5455,6 +5462,11 @@ bool wxDataViewCtrl::InsertColumn( unsigned int pos, wxDataViewColumn *col )
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxDataViewCtrl::OnColumnResized()
|
||||
{
|
||||
m_clientArea->UpdateDisplay();
|
||||
}
|
||||
|
||||
void wxDataViewCtrl::OnColumnWidthChange(unsigned int idx)
|
||||
{
|
||||
InvalidateColBestWidth(idx);
|
||||
|
||||
Reference in New Issue
Block a user