forked from osmocom/wireshark
Qt: Clear the packet list selection before freezing it.
Call selectionModel()->clear() before removing our model. This will hopefully make sure we don't end up with an invalid selection in selectionChanged(). Clear the selection model before clearing the model while we're here. Change-Id: I1007eeaa480afa0fb31dafc15a49ca6c247b30c8 Reviewed-on: https://code.wireshark.org/review/16062 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Kenny Root <kenny@the-b.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
debbf7e930
commit
c664f72f36
|
@ -893,6 +893,7 @@ void PacketList::freeze()
|
|||
{
|
||||
setUpdatesEnabled(false);
|
||||
column_state_ = header()->saveState();
|
||||
selectionModel()->clear();
|
||||
setModel(NULL);
|
||||
// It looks like GTK+ sends a cursor-changed signal at this point but Qt doesn't
|
||||
// call selectionChanged.
|
||||
|
@ -917,6 +918,7 @@ void PacketList::thaw()
|
|||
void PacketList::clear() {
|
||||
// packet_history_clear();
|
||||
related_packet_delegate_.clear();
|
||||
selectionModel()->clear();
|
||||
packet_list_model_->clear();
|
||||
proto_tree_->clear();
|
||||
byte_view_tab_->clear();
|
||||
|
|
Loading…
Reference in New Issue