Fix crash in wxDataViewProgressRenderer in non-Unicode build.

We can't use the column pointer in wxDataViewProgressRenderer ctor as it's not
set yet, so postpone setting the renderer label until later in non-Unicode
build which needs the font used by this column to do the conversion to UTF-8.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68145 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-07-04 09:03:00 +00:00
parent 0cc1991e2a
commit fdd67a6a50
2 changed files with 45 additions and 7 deletions

View File

@@ -185,9 +185,17 @@ public:
virtual wxSize GetSize() const;
private:
void GTKSetLabel();
wxString m_label;
int m_value;
#if !wxUSE_UNICODE
// Flag used to indicate that we need to set the label because we were
// unable to do it in the ctor (see comments there).
bool m_needsToSetLabel;
#endif // !wxUSE_UNICODE
protected:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer)
};