mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
SliderInt: Fixed click/drag when v_min==v_max from setting the value to zero. (#3774)
This commit is contained in:
parent
24be26e00e
commit
4dec436161
2 changed files with 3 additions and 1 deletions
|
|
@ -2589,7 +2589,7 @@ template<typename TYPE, typename SIGNEDTYPE, typename FLOATTYPE>
|
|||
TYPE ImGui::ScaleValueFromRatioT(ImGuiDataType data_type, float t, TYPE v_min, TYPE v_max, bool is_logarithmic, float logarithmic_zero_epsilon, float zero_deadzone_halfsize)
|
||||
{
|
||||
if (v_min == v_max)
|
||||
return (TYPE)0.0f;
|
||||
return v_min;
|
||||
const bool is_decimal = (data_type == ImGuiDataType_Float) || (data_type == ImGuiDataType_Double);
|
||||
|
||||
TYPE result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue