aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/qt/preferences_dialog.cpp5
-rw-r--r--ui/qt/uat_frame.cpp19
-rw-r--r--ui/qt/uat_frame.h1
3 files changed, 21 insertions, 4 deletions
diff --git a/ui/qt/preferences_dialog.cpp b/ui/qt/preferences_dialog.cpp
index 590dc251b9..725f9d58dd 100644
--- a/ui/qt/preferences_dialog.cpp
+++ b/ui/qt/preferences_dialog.cpp
@@ -917,6 +917,11 @@ void PreferencesDialog::on_buttonBox_accepted()
pd_ui_->filterExpressonsFrame->acceptChanges();
pd_ui_->expertFrame->acceptChanges();
+ //Filter expressions don't affect dissection, so there is no need to
+ //send any events to that effect. However, the app needs to know
+ //about any button changes.
+ wsApp->emitAppSignal(WiresharkApplication::FilterExpressionsChanged);
+
prefs_main_write();
if (save_decode_as_entries(&err) < 0)
{
diff --git a/ui/qt/uat_frame.cpp b/ui/qt/uat_frame.cpp
index afaf6a4859..ca330082fd 100644
--- a/ui/qt/uat_frame.cpp
+++ b/ui/qt/uat_frame.cpp
@@ -114,6 +114,20 @@ void UatFrame::setUat(epan_uat *uat)
setWindowTitle(title);
}
+void UatFrame::applyChanges()
+{
+ if (!uat_) return;
+
+ if (uat_->flags & UAT_AFFECTS_FIELDS) {
+ /* Recreate list with new fields and redissect packets */
+ wsApp->queueAppSignal(WiresharkApplication::FieldsChanged);
+ }
+ if (uat_->flags & UAT_AFFECTS_DISSECTION) {
+ /* Just redissect packets if we have any */
+ wsApp->queueAppSignal(WiresharkApplication::PacketDissectionChanged);
+ }
+}
+
void UatFrame::acceptChanges()
{
if (!uat_) return;
@@ -130,10 +144,7 @@ void UatFrame::acceptChanges()
uat_->post_update_cb();
}
- //Filter expressions don't affect dissection, so there is no need to
- //send any events to that effect. However, the app needs to know
- //about any button changes.
- wsApp->emitAppSignal(WiresharkApplication::FilterExpressionsChanged);
+ applyChanges();
}
}
diff --git a/ui/qt/uat_frame.h b/ui/qt/uat_frame.h
index 85acb55105..2d056ef20b 100644
--- a/ui/qt/uat_frame.h
+++ b/ui/qt/uat_frame.h
@@ -55,6 +55,7 @@ private:
void checkForErrorHint(const QModelIndex &current, const QModelIndex &previous);
bool trySetErrorHintFromField(const QModelIndex &index);
void addRecord(bool copy_from_current = false);
+ void applyChanges();
private slots:
void modelDataChanged(const QModelIndex &topLeft);