diff options
author | Gerald Combs <gerald@wireshark.org> | 2012-12-29 01:42:01 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2012-12-29 01:42:01 +0000 |
commit | a562691080638ef1bda599213c39bad1975963b7 (patch) | |
tree | db03d87ccadf3ea33136652c8eac9a6c46ea476c /ui/qt/profile_dialog.cpp | |
parent | 5bd252c44fd47ccf95ed6cedfa8759ac1c1c9dae (diff) | |
download | wireshark-a562691080638ef1bda599213c39bad1975963b7.tar.gz |
Profile switching works when we have a capture file open so go ahead and
enable it.
svn path=/trunk/; revision=46835
Diffstat (limited to 'ui/qt/profile_dialog.cpp')
-rw-r--r-- | ui/qt/profile_dialog.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ui/qt/profile_dialog.cpp b/ui/qt/profile_dialog.cpp index 25b20966af..01fdf12c30 100644 --- a/ui/qt/profile_dialog.cpp +++ b/ui/qt/profile_dialog.cpp @@ -231,7 +231,7 @@ void ProfileDialog::on_copyToolButton_clicked() void ProfileDialog::on_buttonBox_accepted() { const gchar *err_msg; -// QTreeWidgetItem *item = pd_ui_->profileTreeWidget->currentItem(); + QTreeWidgetItem *item = pd_ui_->profileTreeWidget->currentItem(); if ((err_msg = apply_profile_changes()) != NULL) { QMessageBox::critical(this, tr("Profile Error"), @@ -240,17 +240,17 @@ void ProfileDialog::on_buttonBox_accepted() return; } -// if (item) { -// profile_def *profile = (profile_def *) item->data(0, Qt::UserRole).value<GList *>()->data; -// if (profile_exists (profile->name, FALSE) || profile_exists (profile->name, TRUE)) { -// /* The new profile exists, change */ -// wsApp->setConfigurationProfile (profile->name); -// } else if (!profile_exists (get_profile_name(), FALSE)) { -// /* The new profile does not exist, and the previous profile has -// been deleted. Change to the default profile */ -// wsApp->setConfigurationProfile (NULL); -// } -// } + if (item) { + profile_def *profile = (profile_def *) item->data(0, Qt::UserRole).value<GList *>()->data; + if (profile_exists (profile->name, FALSE) || profile_exists (profile->name, TRUE)) { + /* The new profile exists, change */ + wsApp->setConfigurationProfile (profile->name); + } else if (!profile_exists (get_profile_name(), FALSE)) { + /* The new profile does not exist, and the previous profile has + been deleted. Change to the default profile */ + wsApp->setConfigurationProfile (NULL); + } + } } void ProfileDialog::on_buttonBox_helpRequested() |