From 219e4fb8fbec8ba0e811b1b8d8395f920d44b0bb Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 27 Nov 2016 17:49:04 +0100 Subject: [PATCH] SliderInt, SliderFloat: Passing v_min==v_max disable setting value from clicking/dragging (#919) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 2719f8293..e4d6789be 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -6526,7 +6526,7 @@ bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v // Round past decimal precision new_value = RoundScalar(new_value, decimal_precision); - if (*v != new_value) + if (*v != new_value && (v_min != v_max)) { *v = new_value; value_changed = true;