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:
Vadim Zeitlin
2007-02-14 20:35:24 +00:00
parent 261205e4e5
commit f030b28c93
2 changed files with 22 additions and 32 deletions

View File

@@ -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)