From ccb2a947a27d9fe5c711a7d7bc5ab18c6fa0b78b Mon Sep 17 00:00:00 2001 From: domgho Date: Fri, 4 Oct 2019 11:57:20 +0200 Subject: [PATCH] Internal: SliderBehaviorT: Condition '!is_decimal' is always true (#2828) --- imgui_widgets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index a16cff3c4..26e1d648a 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -2430,7 +2430,7 @@ bool ImGui::SliderBehaviorT(const ImRect& bb, ImGuiID id, ImGuiDataType data_typ FLOATTYPE v_new_off_f = (v_max - v_min) * clicked_t; TYPE v_new_off_floor = (TYPE)(v_new_off_f); TYPE v_new_off_round = (TYPE)(v_new_off_f + (FLOATTYPE)0.5); - if (!is_decimal && v_new_off_floor < v_new_off_round) + if (v_new_off_floor < v_new_off_round) v_new = v_min + v_new_off_round; else v_new = v_min + v_new_off_floor;