소스 검색

SliderInt, SliderFloat() interacting enforce modifying to the value to be consistent with other widget behaviors (#919)

ocornut 9 년 전
부모
커밋
449c47c789
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      imgui.cpp

+ 1 - 1
imgui.cpp

@@ -6551,7 +6551,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 && (v_min != v_max))
+            if (*v != new_value)
             {
                 *v = new_value;
                 value_changed = true;