forked from osmocom/wireshark
Qt: Fetch OverlayScrollBar sliderPosition from the real ScrollBar
In OverlayScrollBar return the real ScrollBar sliderPosition to ensure the correct value is used when handling the actionTriggered signal in vScrollBarActionTriggered(). This improves turning on and off auto scroll during capture when page stepping using the packet list slider, because the value is propagated after this signal.
This commit is contained in:
parent
718cff5264
commit
7980f25f99
|
@ -1834,7 +1834,7 @@ void PacketList::vScrollBarActionTriggered(int)
|
|||
{
|
||||
// If we're scrolling with a mouse wheel or trackpad sliderPosition can end up
|
||||
// past the end.
|
||||
tail_at_end_ = (verticalScrollBar()->sliderPosition() >= verticalScrollBar()->maximum());
|
||||
tail_at_end_ = (overlay_sb_->sliderPosition() >= overlay_sb_->maximum());
|
||||
|
||||
scrollViewChanged(tail_at_end_);
|
||||
}
|
||||
|
|
|
@ -94,6 +94,11 @@ QSize OverlayScrollBar::sizeHint() const
|
|||
QScrollBar::sizeHint().height());
|
||||
}
|
||||
|
||||
int OverlayScrollBar::sliderPosition()
|
||||
{
|
||||
return child_sb_.sliderPosition();
|
||||
}
|
||||
|
||||
void OverlayScrollBar::setNearOverlayImage(QImage &overlay_image, int packet_count, int start_pos, int end_pos, QList<int> positions)
|
||||
{
|
||||
int old_width = packet_map_img_.width();
|
||||
|
|
|
@ -22,6 +22,7 @@ public:
|
|||
virtual ~OverlayScrollBar();
|
||||
|
||||
virtual QSize sizeHint() const;
|
||||
virtual int sliderPosition();
|
||||
|
||||
/** Set the "near" overlay image.
|
||||
* @param overlay_image An image containing a 1:1 mapping of nearby
|
||||
|
|
Loading…
Reference in New Issue