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:
Vadim Zeitlin 2016-03-05 18:43:55 +01:00
parent 34b0e534f8
commit d613fb75f6

View File

@ -64,8 +64,11 @@ public:
virtual void SetWidth(int width) wxOVERRIDE
{
m_width = width;
UpdateDisplay();
if ( width != m_width )
{
m_width = width;
UpdateDisplay();
}
}
virtual int GetWidth() const wxOVERRIDE;