Skip to content

"Relative widget" rounding errors cause spinboxes to get stuck #104

@tassaron

Description

@tassaron

"Relative widgets" (whose values are relative to the output resolution) are stored internally as floats, and the strange code I wrote in 2017 does division and multiplication on every relative widget for every update done by the user, so it can store these for the undo system. This causes an issue where some numbers have rounding errors (e.g., 57, 123) so the undo system thinks they are the same as another number, causing unexpected behaviour (a spinbox will get stuck on these numbers when scrolling through numbers one-by-one, most noticeably).

To-Do List

  • Make change of resolution undoable, which will ensure that two ComponentTrackedWidgetUpdate objects won't merge if they track a relative widget set from a different resolution
  • Ditch floats and simply store the real value of relative widgets, then have the BaseComponent alter relative widgets in response to a signal sent when resolution changes.
  • Save output resolution into the project file, and into presets, so relative widgets can be corrected if they were saved at a different resolution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions