From 5a8c6c9adbe3bb1161f950fa3c92203fa0a4e17e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karsten=20Ball=C3=BCder?= Date: Wed, 15 Jul 1998 14:37:42 +0000 Subject: [PATCH] fixed SetRange/GetValue git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/gauge.cpp | 4 ++-- src/gtk1/gauge.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gtk/gauge.cpp b/src/gtk/gauge.cpp index 786bdac7b0..905423d78a 100644 --- a/src/gtk/gauge.cpp +++ b/src/gtk/gauge.cpp @@ -48,7 +48,7 @@ void wxGauge::SetRange( int r ) m_rangeMax = r; if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax; - gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), (float)(m_rangeMax/m_gaugePos) ); + gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), ((float)m_gaugePos)/m_rangeMax ); }; void wxGauge::SetValue( int pos ) @@ -56,7 +56,7 @@ void wxGauge::SetValue( int pos ) m_gaugePos = pos; if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax; - gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), (float)(m_rangeMax/m_gaugePos) ); + gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), ((float)m_gaugePos)/m_rangeMax ); }; int wxGauge::GetRange(void) const diff --git a/src/gtk1/gauge.cpp b/src/gtk1/gauge.cpp index 786bdac7b0..905423d78a 100644 --- a/src/gtk1/gauge.cpp +++ b/src/gtk1/gauge.cpp @@ -48,7 +48,7 @@ void wxGauge::SetRange( int r ) m_rangeMax = r; if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax; - gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), (float)(m_rangeMax/m_gaugePos) ); + gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), ((float)m_gaugePos)/m_rangeMax ); }; void wxGauge::SetValue( int pos ) @@ -56,7 +56,7 @@ void wxGauge::SetValue( int pos ) m_gaugePos = pos; if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax; - gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), (float)(m_rangeMax/m_gaugePos) ); + gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), ((float)m_gaugePos)/m_rangeMax ); }; int wxGauge::GetRange(void) const -- 2.45.2