summaryrefslogtreecommitdiff
path: root/src/wx/controls.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-12-19 20:02:00 +0100
committerCarl Hetherington <cth@carlh.net>2025-09-03 09:41:16 +0200
commit7f35c43bafa0ce654b4cfb9c7ea5b6ea0c1ddd37 (patch)
treebfb13f90192169e07c286dbd0535fc627dc02631 /src/wx/controls.cc
parent13d5b07d47401ac2ac3dfa58fe3baca7cf9fd64f (diff)
Add and use Time::proportion_of().
Diffstat (limited to 'src/wx/controls.cc')
-rw-r--r--src/wx/controls.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wx/controls.cc b/src/wx/controls.cc
index a452e1d13..7d2830df1 100644
--- a/src/wx/controls.cc
+++ b/src/wx/controls.cc
@@ -266,7 +266,7 @@ Controls::update_position_slider ()
auto const len = _film->length ();
if (len.get ()) {
- int const new_slider_position = 4096 * _viewer.position().get() / len.get();
+ int const new_slider_position = 4096 * _viewer.position().proportion_of(len);
if (new_slider_position != _slider->GetValue()) {
_slider->SetValue (new_slider_position);
}