diff --git a/src/widget/WidgetRange.h b/src/widget/WidgetRange.h index e2f68c73..de917a0c 100644 --- a/src/widget/WidgetRange.h +++ b/src/widget/WidgetRange.h @@ -4,6 +4,11 @@ #include "BaseWidgetValue.h" +/** + * @class WidgetRange + * @brief Widget that allows user to select a value from a range. + * Manages a value within a specified range, allowing incrementing and decrementing. + */ template class WidgetRange : public BaseWidgetValue { protected: @@ -49,17 +54,11 @@ class WidgetRange : public BaseWidgetValue { if (renderer->isInEditMode()) { switch (command) { case UP: - if (increment()) { - BaseWidgetValue::handleChange(); - return true; - } - return false; + if (increment()) BaseWidgetValue::handleChange(); + return true; case DOWN: - if (decrement()) { - BaseWidgetValue::handleChange(); - return true; - } - return false; + if (decrement()) BaseWidgetValue::handleChange(); + return true; default: return false; }