X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f40fdaa339e19bbdf60c9c065c82daae4ca77b36..51036b441d580061db2afa4f58cdb56b77b146cb:/src/gtk/gauge.cpp

diff --git a/src/gtk/gauge.cpp b/src/gtk/gauge.cpp
index 90aad2ca5b..985c42bcc3 100644
--- a/src/gtk/gauge.cpp
+++ b/src/gtk/gauge.cpp
@@ -72,10 +72,13 @@ void wxGauge::DoSetGauge()
 
 wxSize wxGauge::DoGetBestSize() const
 {
+    wxSize best;
     if (HasFlag(wxGA_VERTICAL))
-        return wxSize(28, 100);
+        best = wxSize(28, 100);
     else
-        return wxSize(100, 28);
+        best = wxSize(100, 28);
+    CacheBestSize(best);
+    return best;
 }
 
 void wxGauge::SetRange( int range )