- wxSize newSize = size;
- if (newSize.x == -1) newSize.x = 80;
- if (newSize.y == -1) newSize.y = 26;
- SetSize( newSize.x, newSize.y );
+ wxSize new_size = size,
+ sizeBest = DoGetBestSize();
+ if (new_size.x == -1)
+ new_size.x = sizeBest.x;
+ if (new_size.y == -1)
+ new_size.y = sizeBest.y;
+
+ if ((new_size.x != size.x) || (new_size.y != size.y))
+ SetSize( new_size.x, new_size.y );