forked from osmocom/wireshark
Don't scroll back to the selected frame when we get name resolution updates.
With live or large capture files and asynchronous name resolution this can cause serious scrolling issues as the name resolutions come in. Bug: 12074 Change-Id: I1a5cca410c0608927b32e9e7107885370caf14d7 Reviewed-on: https://code.wireshark.org/review/22245 Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
2de483c092
commit
4e46352657
|
@ -435,7 +435,7 @@ PacketList::PacketList(QWidget *parent) :
|
||||||
|
|
||||||
connect(packet_list_model_, SIGNAL(goToPacket(int)), this, SLOT(goToPacket(int)));
|
connect(packet_list_model_, SIGNAL(goToPacket(int)), this, SLOT(goToPacket(int)));
|
||||||
connect(packet_list_model_, SIGNAL(itemHeightChanged(const QModelIndex&)), this, SLOT(updateRowHeights(const QModelIndex&)));
|
connect(packet_list_model_, SIGNAL(itemHeightChanged(const QModelIndex&)), this, SLOT(updateRowHeights(const QModelIndex&)));
|
||||||
connect(wsApp, SIGNAL(addressResolutionChanged()), this, SLOT(redrawVisiblePackets()));
|
connect(wsApp, SIGNAL(addressResolutionChanged()), this, SLOT(redrawVisiblePacketsDontSelectCurrent()));
|
||||||
|
|
||||||
header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
connect(header(), SIGNAL(customContextMenuRequested(QPoint)),
|
connect(header(), SIGNAL(customContextMenuRequested(QPoint)),
|
||||||
|
@ -750,15 +750,22 @@ void PacketList::drawCurrentPacket()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redraw the packet list and detail. Called from many places.
|
// Redraw the packet list and detail. Re-selects the current packet (causes
|
||||||
// XXX We previously re-selected the packet here, but that seems to cause
|
// the UI to scroll to that packet).
|
||||||
// automatic scrolling problems.
|
// Called from many places.
|
||||||
void PacketList::redrawVisiblePackets() {
|
void PacketList::redrawVisiblePackets() {
|
||||||
update();
|
update();
|
||||||
header()->update();
|
header()->update();
|
||||||
drawCurrentPacket();
|
drawCurrentPacket();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Redraw the packet list and detail.
|
||||||
|
// Does not scroll back to the selected packet.
|
||||||
|
void PacketList::redrawVisiblePacketsDontSelectCurrent() {
|
||||||
|
update();
|
||||||
|
header()->update();
|
||||||
|
}
|
||||||
|
|
||||||
void PacketList::resetColumns()
|
void PacketList::resetColumns()
|
||||||
{
|
{
|
||||||
packet_list_model_->resetColumns();
|
packet_list_model_->resetColumns();
|
||||||
|
|
|
@ -176,6 +176,7 @@ public slots:
|
||||||
void applyTimeShift();
|
void applyTimeShift();
|
||||||
void recolorPackets();
|
void recolorPackets();
|
||||||
void redrawVisiblePackets();
|
void redrawVisiblePackets();
|
||||||
|
void redrawVisiblePacketsDontSelectCurrent();
|
||||||
void columnsChanged();
|
void columnsChanged();
|
||||||
void fieldsChanged(capture_file *cf);
|
void fieldsChanged(capture_file *cf);
|
||||||
void preferencesChanged();
|
void preferencesChanged();
|
||||||
|
|
Loading…
Reference in New Issue