From e3e455cd5ce0d5d9c841712118ab4861f381ecd4 Mon Sep 17 00:00:00 2001 From: Uwe Date: Wed, 9 Mar 2022 01:52:16 +0100 Subject: [PATCH] [Part] Section Cut: fix for tooltip handling --- src/Mod/Part/Gui/SectionCutting.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Mod/Part/Gui/SectionCutting.cpp b/src/Mod/Part/Gui/SectionCutting.cpp index 0d053f8094..4801ad0285 100644 --- a/src/Mod/Part/Gui/SectionCutting.cpp +++ b/src/Mod/Part/Gui/SectionCutting.cpp @@ -755,12 +755,14 @@ void SectionCut::CutValueHelper(double value, QDoubleSpinBox* SpinBox, QSlider* } // update slider position and tooltip // the slider value is % of the cut range - Slider->blockSignals(true); - Slider->setValue( - int((value - SpinBox->minimum()) - / (SpinBox->maximum() - SpinBox->minimum()) * 100.0)); - Slider->setToolTip(QString::number(value, 'g', Base::UnitsApi::getDecimals())); - Slider->blockSignals(false); + if (Slider->isEnabled()) { + Slider->blockSignals(true); + Slider->setValue( + int((value - SpinBox->minimum()) + / (SpinBox->maximum() - SpinBox->minimum()) * 100.0)); + Slider->setToolTip(QString::number(value, 'g', Base::UnitsApi::getDecimals())); + Slider->blockSignals(false); + } // we cannot cut to the edge because then the result is an empty shape // we chose purposely not to simply set the range for cutX previously