From 34f26bd18f026f8ef92dfb9744a6c14976e5fa02 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 11 Nov 2019 23:59:08 +0100 Subject: [PATCH] Don't change max number of digits in wxSpinCtrl code This doesn't seem to affect anything, i.e. the function returns the same results whether we do it or not, so just don't. --- src/gtk/spinctrl.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/gtk/spinctrl.cpp b/src/gtk/spinctrl.cpp index e58e527f9e..a341b79752 100644 --- a/src/gtk/spinctrl.cpp +++ b/src/gtk/spinctrl.cpp @@ -384,21 +384,9 @@ wxSize wxSpinCtrlGTKBase::DoGetSizeFromTextSize(int xlen, int ylen) const const gint widthChars = gtk_entry_get_width_chars(GTK_ENTRY(m_widget)); gtk_entry_set_width_chars(GTK_ENTRY(m_widget), numDigits); -#if GTK_CHECK_VERSION(3,12,0) - gint maxWidthChars = 0; - if ( gtk_check_version(3,12,0) == NULL ) - { - maxWidthChars = gtk_entry_get_max_width_chars(GTK_ENTRY(m_widget)); - gtk_entry_set_max_width_chars(GTK_ENTRY(m_widget), numDigits); - } -#endif // GTK+ 3.12+ wxSize tsize = GTKGetPreferredSize(m_widget); -#if GTK_CHECK_VERSION(3,12,0) - if ( gtk_check_version(3,12,0) == NULL ) - gtk_entry_set_max_width_chars(GTK_ENTRY(m_widget), maxWidthChars); -#endif // GTK+ 3.12+ gtk_entry_set_width_chars(GTK_ENTRY(m_widget), widthChars); // Check if the user requested a non-standard height.