use AllocExclusive() instead of duplicating its code in wxFont-specific Unshare(); this fixes recreating the font whenever it is modified (even if it's not shared) bug
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -120,11 +120,6 @@ public:
|
||||
// for consistency with other wxMSW classes
|
||||
WXHFONT GetHFONT() const;
|
||||
|
||||
/*
|
||||
virtual bool UseResource();
|
||||
virtual bool ReleaseResource();
|
||||
*/
|
||||
|
||||
protected:
|
||||
// real font creation function, used in all cases
|
||||
bool DoCreate(int size,
|
||||
@@ -139,7 +134,9 @@ protected:
|
||||
|
||||
virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info);
|
||||
|
||||
void Unshare();
|
||||
// implement wxObject virtuals which are used by AllocExclusive()
|
||||
virtual wxObjectRefData *CreateRefData() const;
|
||||
virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxFont)
|
||||
|
Reference in New Issue
Block a user