Don't update if column width didn't change in generic wxDataViewCtrl
Avoid calling UpdateDisplay() unnecessarily if the column width didn't really change. This doesn't result in anything really bad happening right now, but it could easily result in an infinite stream of updates if the code were only slightly different and it just seems useless to do it.
This commit is contained in:
@@ -63,10 +63,13 @@ public:
|
||||
}
|
||||
|
||||
virtual void SetWidth(int width) wxOVERRIDE
|
||||
{
|
||||
if ( width != m_width )
|
||||
{
|
||||
m_width = width;
|
||||
UpdateDisplay();
|
||||
}
|
||||
}
|
||||
virtual int GetWidth() const wxOVERRIDE;
|
||||
|
||||
virtual void SetMinWidth(int minWidth) wxOVERRIDE
|
||||
|
Reference in New Issue
Block a user