Skip to content

Floats are drawn with DragValue, so a nan opens as inf and is marked edited #10

Open

Description

@anderix

DESIGN.md §5 says a float is drawn as text through buffered_text, the way a datetime is, because egui::DragValue clamps what it is handed (NaN becomes infinity and the clamp is reported as a change) and rounds what it shows. flyleaf/src/tree.rs (Value::Float arm, around line 904) still draws floats with DragValue; only datetimes go through buffered_text. So a = nan opens as a = inf, marked edited, with nobody having touched it, and a float's spelling is not preserved until edited. packaging/samples/README.md notes the sample file omits nan for this reason; put it back when this is fixed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions