diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-11-22 17:59:15 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-11-22 17:59:15 +0000 |
commit | 213d47a82e9ab44e91d4693755129e441f0e83ec (patch) | |
tree | 2215399cd655b9fc2e61aae7661879747698130f /ui | |
parent | 779f95ab6131e60df4bf83f0b72b9cf2dc75766c (diff) |
Fix packet list selection signaling.
It looks like resetting the packet list model during freezing and
thawing disconnects the selection changed signal between the model and
the main window. Rename the packet list's setMenusFollowStream signal to
packetSelectionChanged and use it to trigger menu updates in the main
window.
svn path=/trunk/; revision=53516
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/main_window.cpp | 4 | ||||
-rw-r--r-- | ui/qt/packet_list.cpp | 4 | ||||
-rw-r--r-- | ui/qt/packet_list.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp index 6a50cb5d3e..cbd010aa8e 100644 --- a/ui/qt/main_window.cpp +++ b/ui/qt/main_window.cpp @@ -269,11 +269,11 @@ MainWindow::MainWindow(QWidget *parent) : connect(main_ui_->actionViewCollapseAll, SIGNAL(triggered()), proto_tree_, SLOT(collapseAll())); - connect(packet_list_->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), + connect(packet_list_, SIGNAL(packetSelectionChanged()), this, SLOT(setMenusForSelectedPacket())); connect(packet_list_, SIGNAL(packetDissectionChanged()), this, SLOT(redissectPackets())); - connect(packet_list_, SIGNAL(setMenusFollowStream()), + connect(packet_list_, SIGNAL(packetSelectionChanged()), this, SLOT(setMenusForFollowStream())); connect(proto_tree_, SIGNAL(protoItemSelected(QString&)), diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp index 6701505e55..ad6ffcb324 100644 --- a/ui/qt/packet_list.cpp +++ b/ui/qt/packet_list.cpp @@ -427,7 +427,7 @@ void PacketList::selectionChanged (const QItemSelection & selected, const QItemS int row = selected.first().top(); cf_select_packet(cap_file_, row); related_packet_delegate_.clear(); - emit setMenusFollowStream(); + emit packetSelectionChanged(); if (!cap_file_->edt) return; @@ -586,8 +586,8 @@ void PacketList::freeze() void PacketList::thaw() { - setUpdatesEnabled(true); setModel(packet_list_model_); + setUpdatesEnabled(true); } void PacketList::clear() { diff --git a/ui/qt/packet_list.h b/ui/qt/packet_list.h index c3b06243f7..4c83a74777 100644 --- a/ui/qt/packet_list.h +++ b/ui/qt/packet_list.h @@ -77,7 +77,7 @@ private: signals: void packetDissectionChanged(); - void setMenusFollowStream(); + void packetSelectionChanged(); public slots: void setCaptureFile(capture_file *cf); |