diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2017-03-03 08:52:29 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2017-03-03 19:35:28 +0000 |
commit | f22964da50418c6f3d7d9fef1c130d4887173351 (patch) | |
tree | 93bcab76d09a1faf2da7999d864496d6a92fb5d7 /ui/qt/packet_list.cpp | |
parent | c79b5e0eb74a5ef5e91697618a87b4c591ccf3cc (diff) | |
download | wireshark-f22964da50418c6f3d7d9fef1c130d4887173351.tar.gz |
Qt: Fix goto next/prev packet toolbar buttons
Use bitwise AND to check if a modifier bit is set.
Also changed from MetaModifier to AltModifier to match the comment
and the modifier key used in "Next/Previous Packet in History".
Change-Id: I89072a1dfdd14a2beb7344a672cbc18a3ace8924
Reviewed-on: https://code.wireshark.org/review/20359
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'ui/qt/packet_list.cpp')
-rw-r--r-- | ui/qt/packet_list.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index e3095fd3f8..29cb6c677c 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -1167,8 +1167,9 @@ void PacketList::setMonospaceFont(const QFont &mono_font) header()->setFont(wsApp->font()); } -void PacketList::goNextPacket(void) { - if (QApplication::keyboardModifiers() | Qt::MetaModifier) { +void PacketList::goNextPacket(void) +{ + if (QApplication::keyboardModifiers() & Qt::AltModifier) { // Alt+toolbar goNextHistoryPacket(); return; @@ -1182,8 +1183,9 @@ void PacketList::goNextPacket(void) { } } -void PacketList::goPreviousPacket(void) { - if (QApplication::keyboardModifiers() | Qt::MetaModifier) { +void PacketList::goPreviousPacket(void) +{ + if (QApplication::keyboardModifiers() & Qt::AltModifier) { // Alt+toolbar goPreviousHistoryPacket(); return; |