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:
@@ -64,8 +64,11 @@ public:
|
|||||||
|
|
||||||
virtual void SetWidth(int width) wxOVERRIDE
|
virtual void SetWidth(int width) wxOVERRIDE
|
||||||
{
|
{
|
||||||
m_width = width;
|
if ( width != m_width )
|
||||||
UpdateDisplay();
|
{
|
||||||
|
m_width = width;
|
||||||
|
UpdateDisplay();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
virtual int GetWidth() const wxOVERRIDE;
|
virtual int GetWidth() const wxOVERRIDE;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user