Skip to content

Prevent Timeline selections that are out of bounds#147

Open
TuongNM wants to merge 1 commit intohaskell:masterfrom
TuongNM:selections-out-of-bounds
Open

Prevent Timeline selections that are out of bounds#147
TuongNM wants to merge 1 commit intohaskell:masterfrom
TuongNM:selections-out-of-bounds

Conversation

@TuongNM
Copy link
Contributor

@TuongNM TuongNM commented Feb 14, 2026

Fixes #40

While testing this I noticed an issue for #145 where a wrong background color was used when making a PointSelection. I included a fix for that in this PR.

timelineSetSelection now returns Nothing in case of an invalid selection
that's solely outside of the TimelineView for both a PointSelection and
a RangeSelection. A RangeSelection is additionally clamped to the bounds
of the TimelineView to stop dragging when the bounds have been reached.

The new return value is processed inside the Mouse and Event handling
accordingly. Within this the EventCursorChangedIndex handling now
includes updating previously omitted views. This fixes an issue where
following a RangeSelection with a selection inside the EventsView would
cause the previously omitted views to still display the information of
the RangeSelection and not the equivalent PointSelection of the
EventsView selection.

Lastly, fix an issue from the previous commit that added styling usage
inside the EventsView. The wrong background color was applied to a
selected Event when making the second PointSelection after a
RangeSelection or a PointSelection without a preceding RangeSelection.
StateSelected is now always applied when selected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Threadscope allows selection after the end of the trace

1 participant