diff options
author | Jirka Novak <j.novak@netsystem.cz> | 2021-01-06 23:49:36 +0100 |
---|---|---|
committer | AndersBroman <a.broman58@gmail.com> | 2021-01-07 09:56:18 +0000 |
commit | 1d43b2a3aa50359e002c2016024167cb8c7fa365 (patch) | |
tree | ec598bc497c09fe1ed4b09b9f6c7c53c488a13df /ui/qt/rtp_analysis_dialog.cpp | |
parent | 55075f6e8dce1093d2be50ce5b84bf05a2f07e8c (diff) |
Telecom dialogs: Fixed issues during capture file closing
When capture file is closing/closed, dialogs do not disable buttons which
can't work without capture file. Patch fixes it.
Diffstat (limited to 'ui/qt/rtp_analysis_dialog.cpp')
-rw-r--r-- | ui/qt/rtp_analysis_dialog.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ui/qt/rtp_analysis_dialog.cpp b/ui/qt/rtp_analysis_dialog.cpp index a2827d1499..6b26513e16 100644 --- a/ui/qt/rtp_analysis_dialog.cpp +++ b/ui/qt/rtp_analysis_dialog.cpp @@ -376,8 +376,6 @@ RtpAnalysisDialog::RtpAnalysisDialog(QWidget &parent, CaptureFile &cf, rtpstream this, SLOT(updateWidgets())); connect(ui->reverseTreeWidget, SIGNAL(itemSelectionChanged()), this, SLOT(updateWidgets())); - connect(&cap_file_, SIGNAL(captureFileClosing()), - this, SLOT(updateWidgets())); updateWidgets(); updateStatistics(); @@ -393,9 +391,9 @@ RtpAnalysisDialog::~RtpAnalysisDialog() delete rev_tempfile_; } +// TODO: Can be removed if not used to fix issue with disabling buttons void RtpAnalysisDialog::captureFileClosing() { - updateWidgets(); WiresharkDialog::captureFileClosing(); } @@ -428,8 +426,8 @@ void RtpAnalysisDialog::updateWidgets() hint.append(tr(" G: Go to packet, N: Next problem packet")); } - bool enable_save_fwd_audio = fwd_statinfo_.rtp_stats.total_nr && (save_payload_error_ == TAP_RTP_NO_ERROR); - bool enable_save_rev_audio = rev_statinfo_.rtp_stats.total_nr && (save_payload_error_ == TAP_RTP_NO_ERROR); + bool enable_save_fwd_audio = fwd_statinfo_.rtp_stats.total_nr && (save_payload_error_ == TAP_RTP_NO_ERROR) && !file_closed_; + bool enable_save_rev_audio = rev_statinfo_.rtp_stats.total_nr && (save_payload_error_ == TAP_RTP_NO_ERROR) && !file_closed_; ui->actionSaveAudioUnsync->setEnabled(enable_save_fwd_audio && enable_save_rev_audio); ui->actionSaveForwardAudioUnsync->setEnabled(enable_save_fwd_audio); ui->actionSaveReverseAudioUnsync->setEnabled(enable_save_rev_audio); @@ -447,7 +445,7 @@ void RtpAnalysisDialog::updateWidgets() ui->actionSaveReverseCsv->setEnabled(enable_save_rev_csv); #if defined(QT_MULTIMEDIA_LIB) - player_button_->setEnabled(num_streams_ > 0); + player_button_->setEnabled(num_streams_ > 0 && !file_closed_); #else player_button_->setEnabled(false); player_button_->setText(tr("No Audio")); |