1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-28 09:30:56 +01:00

SliderInt, SliderFloat: Passing v_min==v_max disable setting value from clicking/dragging (#919)

This commit is contained in:
ocornut 2016-11-27 17:49:04 +01:00
parent a868c32ed1
commit 219e4fb8fb

View File

@ -6526,7 +6526,7 @@ bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v
// Round past decimal precision // Round past decimal precision
new_value = RoundScalar(new_value, decimal_precision); new_value = RoundScalar(new_value, decimal_precision);
if (*v != new_value) if (*v != new_value && (v_min != v_max))
{ {
*v = new_value; *v = new_value;
value_changed = true; value_changed = true;