Skip to content

Conversation

@peci1
Copy link
Contributor

@peci1 peci1 commented May 7, 2025

When I launch rqt_bag, it shows up on my primary display. However, I cannot click most parts of the timeline to move the caret. There's no reaction at all. Usually, I can only click about 100 px from the left side of the bag view. Also, there is no vertical scrollbar even if it should be there.

I tried printing mousePressEvent in TimelineFrame and it is indeed not called on some parts of the bag view.

Then I went down the rabbit hole trying to find out where does the event get lost. I'm pretty confident that the culprit is in wrong initialization of the internal index held by BagTimeline(QGraphicsScene). When this index is wrong, the hit test in QGraphicsScene will not succeed for the TimelineFrame item and it will not receive the event. My guess is that the index is computed before the timeline object is resized.

One way to reset the index is to resize the window. If I resize it (via the OS GUI buttons), the problem gets fixed and I can click anywhere (well, up to #175) and the scrollbar appears. However, this is not very convenient

Another way to reset the index is to trigger a resize event programatically. That's basically what #63 does. So I ported a similar fix into ROS 2.


First, I thought this might be an issue with my multi-monitor setup. However, now I figured it behaves the same just with the laptop on my lap, so no external displays... Anyways, if it helps, I have a multi-monitor setup where the primary screen is not the top-left-most one:

output DisplayPort-7
mode 1920x1200
pos 0x0
rate 59.95
rotate left
output DisplayPort-4
mode 1920x1200
pos 1200x379
primary
rate 59.95
output eDP
mode 1920x1080
pos 1200x1579
rate 60.00

So, DisplayPort-7 is the top-left-most one, and it is rotated, so it is 1200x1920. DisplayPort-4 is the primary display and its top left corner lies on coordinates 1200x379 of the global space.

…ry display not the left-most one.

Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
@sloretz
Copy link

sloretz commented Jun 6, 2025

I tried this PR locally. I see the same behavior before and after this PR. I tried both starting either rqt and choosing the Bag plugin, or running rqt_bag.

I loaded this bag. When I click anywhere in the timeline, nothing happens. If I resize the window, I can begin clicking in the timeline.

I see the changes to update_size methods. Is there supposed to be something new that calls them?

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.

2 participants