Fix wxMenuItem::SetBitmap infinite recursion differently.
Don't call SetBitmap from GetHBitmapForMenu but instead handle possibly needed bitmap modifications earlier on during SetBitmap. Allows for GetHBitmapForMenu to be const and gets rid of the clumsy re-entry check introduced in r76754. Also check the bitmap for alpha presence instead of needlessly converting the bitmap to an image and checking the latter for alpha. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -125,7 +125,7 @@ private:
|
||||
};
|
||||
|
||||
// helper function to get a handle for bitmap associated with item
|
||||
WXHBITMAP GetHBitmapForMenu(BitmapKind kind);
|
||||
WXHBITMAP GetHBitmapForMenu(BitmapKind kind) const;
|
||||
|
||||
// helper function to set/change the bitmap
|
||||
void DoSetBitmap(const wxBitmap& bmp, bool bChecked);
|
||||
|
Reference in New Issue
Block a user