aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ui/qt/capture_file_properties_dialog.cpp16
-rw-r--r--ui/qt/capture_file_properties_dialog.h3
2 files changed, 14 insertions, 5 deletions
diff --git a/ui/qt/capture_file_properties_dialog.cpp b/ui/qt/capture_file_properties_dialog.cpp
index 47673ad548..96816e8f94 100644
--- a/ui/qt/capture_file_properties_dialog.cpp
+++ b/ui/qt/capture_file_properties_dialog.cpp
@@ -90,11 +90,23 @@ void CaptureFilePropertiesDialog::setCaptureFile(capture_file *cf)
void CaptureFilePropertiesDialog::updateWidgets()
{
+ QPushButton *refresh_bt = ui->buttonBox->button(QDialogButtonBox::Reset);
QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save);
+ QPushButton *copy_bt = ui->buttonBox->button(QDialogButtonBox::Apply);
+
if (!cap_file_) {
- refresh_button_->setEnabled(false);
+ if (refresh_bt) {
+ refresh_bt->setEnabled(false);
+ }
+ ui->detailsTextEdit->clear();
+ ui->commentsTextEdit->clear();
ui->commentsTextEdit->setReadOnly(true);
- save_bt->setEnabled(false);
+ if (save_bt) {
+ save_bt->setEnabled(false);
+ }
+ if (copy_bt) {
+ copy_bt->setEnabled(false);
+ }
return;
}
diff --git a/ui/qt/capture_file_properties_dialog.h b/ui/qt/capture_file_properties_dialog.h
index c4df9f1316..27e6a4ff95 100644
--- a/ui/qt/capture_file_properties_dialog.h
+++ b/ui/qt/capture_file_properties_dialog.h
@@ -72,9 +72,6 @@ private:
Ui::SummaryDialog *ui;
capture_file *cap_file_;
- QPushButton *refresh_button_;
- QPushButton *copy_comment_button_;
-
QString timeToString(time_t ti_time);
QString summaryToHtml();