mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
SliderInt: Fixed click/drag when v_min==v_max from setting the value to zero. (#3774)
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user