aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/qt/byte_view_tab.cpp4
-rw-r--r--ui/qt/main_window.cpp17
-rw-r--r--ui/qt/proto_tree.cpp10
-rw-r--r--ui/qt/utils/field_information.cpp2
4 files changed, 18 insertions, 15 deletions
diff --git a/ui/qt/byte_view_tab.cpp b/ui/qt/byte_view_tab.cpp
index a022f64a1f..dd5e081531 100644
--- a/ui/qt/byte_view_tab.cpp
+++ b/ui/qt/byte_view_tab.cpp
@@ -255,6 +255,10 @@ void ByteViewTab::selectedFieldChanged(FieldInformation *selected)
ByteViewText * byte_view_text = 0;
if (selected) {
+ if (selected->parent() == this) {
+ // We only want inbound signals.
+ return;
+ }
const field_info *fi = selected->fieldInfo();
int idx = 0;
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index 370514098e..ce51e4863a 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -477,8 +477,6 @@ MainWindow::MainWindow(QWidget *parent) :
packet_list_ = new PacketList(&master_split_);
main_ui_->wirelessTimelineWidget->setPacketList(packet_list_);
- connect(packet_list_, SIGNAL(fieldSelected(FieldInformation *)),
- this, SIGNAL(fieldSelected(FieldInformation *)));
connect(packet_list_, SIGNAL(frameSelected(int)),
this, SIGNAL(frameSelected(int)));
connect(this, SIGNAL(frameSelected(int)),
@@ -498,10 +496,15 @@ MainWindow::MainWindow(QWidget *parent) :
this, SIGNAL(fieldSelected(FieldInformation *)));
connect(this, SIGNAL(fieldSelected(FieldInformation *)),
proto_tree_, SLOT(selectedFieldChanged(FieldInformation *)));
- connect(this, SIGNAL(fieldHighlight(FieldInformation *)),
- main_ui_->statusBar, SLOT(highlightedFieldChanged(FieldInformation *)));
+ connect(packet_list_, SIGNAL(fieldSelected(FieldInformation *)),
+ this, SIGNAL(fieldSelected(FieldInformation *)));
+ connect(this, SIGNAL(fieldSelected(FieldInformation *)),
+ this, SLOT(setMenusForSelectedTreeRow(FieldInformation *)));
connect(this, SIGNAL(fieldSelected(FieldInformation *)),
main_ui_->statusBar, SLOT(selectedFieldChanged(FieldInformation *)));
+
+ connect(this, SIGNAL(fieldHighlight(FieldInformation *)),
+ main_ui_->statusBar, SLOT(highlightedFieldChanged(FieldInformation *)));
connect(wsApp, SIGNAL(captureActive(int)), this, SIGNAL(captureActive(int)));
createByteViewDialog();
@@ -643,12 +646,6 @@ MainWindow::MainWindow(QWidget *parent) :
connect(packet_list_->packetListModel(), SIGNAL(popProgressStatus()),
main_ui_->statusBar, SLOT(popProgressStatus()));
- connect(proto_tree_, SIGNAL(fieldSelected(FieldInformation *)),
- this, SIGNAL(fieldSelected(FieldInformation *)));
- connect(this, SIGNAL(fieldSelected(FieldInformation *)),
- main_ui_->statusBar, SLOT(selectedFieldChanged(FieldInformation *)));
- connect(this, SIGNAL(fieldSelected(FieldInformation *)),
- this, SLOT(setMenusForSelectedTreeRow(FieldInformation *)));
connect(proto_tree_, SIGNAL(openPacketInNewWindow(bool)),
this, SLOT(openPacketDialog(bool)));
connect(proto_tree_, SIGNAL(showProtocolPreferences(QString)),
diff --git a/ui/qt/proto_tree.cpp b/ui/qt/proto_tree.cpp
index f67fcde882..6ce06c6196 100644
--- a/ui/qt/proto_tree.cpp
+++ b/ui/qt/proto_tree.cpp
@@ -262,7 +262,7 @@ void ProtoTree::selectionChanged(const QItemSelection &selected, const QItemSele
QModelIndex index = selected.indexes().first();
- FieldInformation finfo(proto_tree_model_->protoNodeFromIndex(index).protoNode());
+ FieldInformation finfo(proto_tree_model_->protoNodeFromIndex(index).protoNode(), this);
if (!finfo.isValid()) return;
// Find and highlight the protocol bytes
@@ -423,10 +423,12 @@ void ProtoTree::itemDoubleClicked(const QModelIndex &index) {
void ProtoTree::selectedFieldChanged(FieldInformation *finfo)
{
QModelIndex index = proto_tree_model_->findFieldInformation(finfo);
- if (index.isValid()) {
- scrollTo(index);
- selectionModel()->select(index, QItemSelectionModel::ClearAndSelect);
+ if (!index.isValid() || finfo->parent() == this) {
+ // We only want valid, inbound signals.
+ return;
}
+ scrollTo(index);
+ selectionModel()->select(index, QItemSelectionModel::ClearAndSelect);
}
// Remember the currently focussed field based on:
diff --git a/ui/qt/utils/field_information.cpp b/ui/qt/utils/field_information.cpp
index 0a89b450cb..797f650347 100644
--- a/ui/qt/utils/field_information.cpp
+++ b/ui/qt/utils/field_information.cpp
@@ -93,7 +93,7 @@ FieldInformation::HeaderInfo FieldInformation::headerInfo() const
FieldInformation * FieldInformation::parentField() const
{
- return new FieldInformation(parent_fi_);
+ return new FieldInformation(parent_fi_, parent());
}
bool FieldInformation::tvbContains(FieldInformation *child)