From 7872497479315f7fd3553ea0ed6f76fcd225e383 Mon Sep 17 00:00:00 2001 From: luoliangyi <87842688@qq.com> Date: Fri, 26 Apr 2024 18:06:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scantool/form_deviceconfig.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/scantool/form_deviceconfig.cpp b/app/scantool/form_deviceconfig.cpp index 9d8f4a44..766becb1 100644 --- a/app/scantool/form_deviceconfig.cpp +++ b/app/scantool/form_deviceconfig.cpp @@ -597,8 +597,7 @@ void Form_DeviceConfig::on_sliderClicked(int value) else { QDoubleSpinBox* doubleSpinBox = reinterpret_cast(abstractSpinBox); - double temp = value * doubleSpinBox->singleStep(); - doubleSpinBox->setValue(temp); + doubleSpinBox->setValue(value / 100.0); } break; @@ -634,8 +633,7 @@ void Form_DeviceConfig::on_doubleSpinboxClicked(double value) QString sliderProverty = slider->property("config_name").toString(); if (sliderProverty == spinBoxProverty) { - int temp = round(value / spinBox->singleStep()); - slider->setValue(temp); + slider->setValue(round(value * 100)); break; } }