From e8735f15648ca79a059ff7c4811513c2d24beaf4 Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Mon, 9 Nov 2026 15:54:10 +0100 Subject: [PATCH] fix: the copies of the odometer counter (duplicate: yes) drop their offset too the counter's offset no longer applies once it shows the odometer, the copies of the control which master added kept theirs and showed it on top --- vehicle/Gauge.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vehicle/Gauge.h b/vehicle/Gauge.h index 173c8a9f6..8d27c1144 100644 --- a/vehicle/Gauge.h +++ b/vehicle/Gauge.h @@ -58,11 +58,14 @@ public: // copies of the control animated along with it, from its definitions marked duplicate: yes std::vector const &mirrors() const { return m_mirrors; } - // the value shown is value * scale + offset + // the value shown is value * scale + offset. the copies of the control (mirrors()) show the same value, so they + // get the same offset float offset() const { return m_offset; } void offset( float const Offset ) { - m_offset = Offset; } + m_offset = Offset; + for( auto &mirror : m_mirrors ) { + mirror.m_offset = Offset; } } float scale() const { return m_scale; } // returns offset of submodel associated with the button from the model centre