Skip to content

Commit

Permalink
DragFloat() fixed clamping #180
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Apr 12, 2015
1 parent 6ed06a8 commit 750b6c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 750b6c9

Please sign in to comment.