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:
parent
34b0e534f8
commit
d613fb75f6
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user