summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2017-06-19 16:46:49 -0400
committerMichael Mann <mmann78@netscape.net>2017-06-20 09:56:51 +0000
commit832f62fb658557ccddffc10642054d96ff834fcd (patch)
tree7d4051b44007ed3f2a5664a856f289a926dfdfff /ui
parente62d7efe1134ffe2d0ba0a95c30b35a653fde349 (diff)
downloadwireshark-832f62fb658557ccddffc10642054d96ff834fcd.tar.gz
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> (cherry picked from commit 4e46352657df1d66e8f2ade8c5e3d38ecae18530) Reviewed-on: https://code.wireshark.org/review/22262 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/packet_list.cpp15
-rw-r--r--ui/qt/packet_list.h1
2 files changed, 12 insertions, 4 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index d48c834c70..2a81d446c5 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -435,7 +435,7 @@ PacketList::PacketList(QWidget *parent) :
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(wsApp, SIGNAL(addressResolutionChanged()), this, SLOT(redrawVisiblePackets()));
+ connect(wsApp, SIGNAL(addressResolutionChanged()), this, SLOT(redrawVisiblePacketsDontSelectCurrent()));
header()->setContextMenuPolicy(Qt::CustomContextMenu);
connect(header(), SIGNAL(customContextMenuRequested(QPoint)),
@@ -750,15 +750,22 @@ void PacketList::drawCurrentPacket()
}
}
-// Redraw the packet list and detail. Called from many places.
-// XXX We previously re-selected the packet here, but that seems to cause
-// automatic scrolling problems.
+// Redraw the packet list and detail. Re-selects the current packet (causes
+// the UI to scroll to that packet).
+// Called from many places.
void PacketList::redrawVisiblePackets() {
update();
header()->update();
drawCurrentPacket();
}
+// Redraw the packet list and detail.
+// Does not scroll back to the selected packet.
+void PacketList::redrawVisiblePacketsDontSelectCurrent() {
+ update();
+ header()->update();
+}
+
void PacketList::resetColumns()
{
packet_list_model_->resetColumns();
diff --git a/ui/qt/packet_list.h b/ui/qt/packet_list.h
index 68b2f1a182..6d416d33bd 100644
--- a/ui/qt/packet_list.h
+++ b/ui/qt/packet_list.h
@@ -177,6 +177,7 @@ public slots:
void applyTimeShift();
void recolorPackets();
void redrawVisiblePackets();
+ void redrawVisiblePacketsDontSelectCurrent();
void columnsChanged();
void fieldsChanged(capture_file *cf);
void preferencesChanged();