X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/88684daa70085522a07302c4cb1ab8346a8102ea..ada175836e7b9e456b7f32d82bfb5f6b21d5608d:/src/gtk/stattext.cpp diff --git a/src/gtk/stattext.cpp b/src/gtk/stattext.cpp index e0d277d91b..ebbd47c37c 100644 --- a/src/gtk/stattext.cpp +++ b/src/gtk/stattext.cpp @@ -52,6 +52,7 @@ bool wxStaticText::Create(wxWindow *parent, } m_widget = gtk_label_new(NULL); + g_object_ref(m_widget); GtkJustification justify; if ( style & wxALIGN_CENTER_HORIZONTAL ) @@ -130,7 +131,7 @@ void wxStaticText::SetLabel( const wxString& str ) GTKSetLabelForLabel(GTK_LABEL(m_widget), label); // adjust the label size to the new label unless disabled - if ( !HasFlag(wxST_NO_AUTORESIZE) && + if ( !HasFlag(wxST_NO_AUTORESIZE) && !IsEllipsized() ) // if ellipsize is ON, then we don't want to get resized! SetSize( GetBestSize() ); }