forked from osmocom/wireshark
Qt: Keep auto-scroll when starting a new capture
Avoid turning off actionGoAutoScroll when going to the first packet when starting a new capture. Bug: 14257 Change-Id: I676139696cf4917b779c5fd390d7a22fb373a6b5 Reviewed-on: https://code.wireshark.org/review/25568 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
parent
5cb7a729d3
commit
d8565d8f1b
|
@ -112,7 +112,7 @@ packet_list_select_first_row(void)
|
|||
{
|
||||
if (!gbl_cur_packet_list)
|
||||
return;
|
||||
gbl_cur_packet_list->goFirstPacket();
|
||||
gbl_cur_packet_list->goFirstPacket(false);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1187,12 +1187,14 @@ void PacketList::goPreviousPacket(void)
|
|||
scrollViewChanged(false);
|
||||
}
|
||||
|
||||
void PacketList::goFirstPacket(void) {
|
||||
void PacketList::goFirstPacket(bool user_selected) {
|
||||
if (packet_list_model_->rowCount() < 1) return;
|
||||
setCurrentIndex(packet_list_model_->index(0, 0));
|
||||
scrollTo(currentIndex());
|
||||
|
||||
scrollViewChanged(false);
|
||||
if (user_selected) {
|
||||
scrollViewChanged(false);
|
||||
}
|
||||
}
|
||||
|
||||
void PacketList::goLastPacket(void) {
|
||||
|
|
|
@ -151,7 +151,7 @@ public slots:
|
|||
void setMonospaceFont(const QFont &mono_font);
|
||||
void goNextPacket();
|
||||
void goPreviousPacket();
|
||||
void goFirstPacket();
|
||||
void goFirstPacket(bool user_selected = true);
|
||||
void goLastPacket();
|
||||
void goToPacket(int packet);
|
||||
void goToPacket(int packet, int hf_id);
|
||||
|
|
Loading…
Reference in New Issue