Don't override DoGetSize, just let the default return the real size of

the widget like normal.  Since the former implementation used
GetBestSize, which uses a DC, which on Mac calls window->GetSize, this
resulted in an infinite recursion.

Also use SetBestFittingSize in the ctor and move CacheBestSize to
DoGetBestSize where it belongs.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-10-25 20:23:06 +00:00
parent 64e4759f43
commit b4b5a92e0b
2 changed files with 5 additions and 11 deletions

View File

@@ -133,7 +133,6 @@ protected:
// Returns the best size for the window, which is the size needed
// to display the text label.
virtual void DoGetSize(int *width, int *height) const;
virtual wxSize DoGetBestSize() const;
// creates a context menu with "Copy URL" menuitem