aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2015-06-24 14:18:04 -0700
committerEvan Huus <eapache@gmail.com>2015-06-24 21:26:39 +0000
commitcc614a93d80eb6472e00e1ba65aff3d18eb7c3a8 (patch)
tree3d2a3e55dc8afabe63b834cde1fb5b1f3f0883d9 /ui
parent1f0226cce9f7f16a3dedb52d6bdf1270b04a6be9 (diff)
qt: fix button state when cancelling save
If the user decides not to capture after all, by hitting cancel when prompted for their unsaved changes, we have to manually uncheck the button again because Qt helpfully checks it for us. Bug: 11145 Change-Id: I362d72787ddb138d382a899d091698c6652eebb2 Reviewed-on: https://code.wireshark.org/review/9102 Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/main_window_slots.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp
index dcbedbdf12..1ea3e1c620 100644
--- a/ui/qt/main_window_slots.cpp
+++ b/ui/qt/main_window_slots.cpp
@@ -3019,8 +3019,13 @@ void MainWindow::on_actionCaptureStart_triggered()
}
/* XXX - will closing this remove a temporary file? */
- if (testCaptureFileClose(FALSE, *new QString(" before starting a new capture")))
+ if (testCaptureFileClose(FALSE, *new QString(" before starting a new capture"))) {
startCapture();
+ } else {
+ // simply clicking the button sets it to 'checked' even though we've
+ // decided to do nothing, so undo that
+ main_ui_->actionCaptureStart->setChecked(false);
+ }
#endif // HAVE_LIBPCAP
}