[Qt] switch screens only if we're acutally starting a capture

don't do the switch when the capture can't be started
(e.g. because we didn't select any interface from which to capture)

Change-Id: Ibabd703863d546c95b9fbe9bd2280d67a22dfc26
Reviewed-on: https://code.wireshark.org/review/9072
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
This commit is contained in:
Martin Kaiser 2015-06-23 13:21:02 -07:00
parent 911b9347ff
commit 633ba955b2
1 changed files with 2 additions and 2 deletions

View File

@ -744,6 +744,8 @@ void MainWindow::startCapture() {
return;
}
main_ui_->mainStack->setCurrentWidget(&master_split_);
// Ideally we should have disabled the start capture
// toolbar buttons and menu items. This may not be the
// case, e.g. with QtMacExtras.
@ -3009,8 +3011,6 @@ void MainWindow::on_actionCaptureStart_triggered()
// return; /* error in options dialog */
// }
main_ui_->mainStack->setCurrentWidget(&master_split_);
#ifdef HAVE_LIBPCAP
if (global_capture_opts.num_selected == 0) {
QString err_msg = tr("No Interface Selected");