emilk / egui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
https://www.egui.rs/
Apache License 2.0
20.64k stars 1.49k forks source link

Remove special case for 0 in DragValue default formatter #4639

Closed YgorSouza closed 1 week ago

YgorSouza commented 3 weeks ago
YgorSouza commented 3 weeks ago

This special case was added in https://github.com/emilk/egui/commit/ebc2486d22355eb6ef1f4827f4304210969b60eb#diff-3878bfa9f60333dd78982f3697643c6755ff8378f18b54fff03973c1eff5fcc8L159-R173, but I don't see any explanation for it, neither in the code nor in the commit message, and removing it doesn't seem to cause any problems, so I'm assuming it was a mistake. If there is a justification for it, I can change this PR to add a comment to the code instead, so no one questions it again.

https://github.com/emilk/egui/assets/43298013/c38aebe1-c6c0-4251-82e5-69cb9aeaa3dd