From 750b6c9224e7dd13aa9d59fdd2c0277af52c8cbb Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 13 Apr 2015 00:07:41 +0100 Subject: [PATCH] DragFloat() fixed clamping #180 --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 8ec6e2c3..691a8239 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5531,7 +5531,7 @@ static bool DragScalarBehavior(const ImRect& frame_bb, ImGuiID id, float* v, flo // Clamp if (v_min < v_max) - g.DragCurrentValue = ImClamp(v_cur, v_min, v_max); + v_cur = ImClamp(v_cur, v_min, v_max); g.DragCurrentValue = v_cur; // Round to user desired precision, then apply