From Thomas ERSFELD (GSoC13) Qtshark : Columns in the packet list table are not updated when you add one on preference menu

svn path=/trunk/; revision=50818
This commit is contained in:
Alexis La Goutte 2013-07-23 08:56:20 +00:00
parent 681c9e7160
commit 6cff72548d
4 changed files with 10 additions and 0 deletions

View File

@ -970,6 +970,7 @@ void MainWindow::recreatePacketList()
col_cleanup(&cfile.cinfo);
build_column_format_array(&cfile.cinfo, prefs.num_cols, FALSE);
packet_list_->updateAll();
packet_list_->hide();
packet_list_->show();

View File

@ -511,6 +511,8 @@ void PacketList::updateAll() {
if (cap_file_->edt && cap_file_->edt->tree) {
proto_tree_->fillProtocolTree(cap_file_->edt->tree);
}
packet_list_model_->resetColumns();
}
void PacketList::clear() {

View File

@ -101,6 +101,12 @@ void PacketListModel::clear() {
endResetModel();
}
void PacketListModel::resetColumns()
{
beginResetModel();
endResetModel();
}
int PacketListModel::rowCount(const QModelIndex &parent) const
{
if (!cap_file_) return 0;

View File

@ -62,6 +62,7 @@ public:
gint appendPacket(frame_data *fdata);
frame_data *getRowFdata(int row);
int visibleIndexOf(frame_data *fdata) const;
void resetColumns();
signals: