diff options
author | Michael Oed <michael.oed@gmail.com> | 2015-03-01 13:56:34 +0100 |
---|---|---|
committer | Michal Labedzki <michal.labedzki@tieto.com> | 2015-03-03 07:37:54 +0000 |
commit | 599dd4ffcc31bb03e44fd4ed72db4d6b8fbc38f0 (patch) | |
tree | b6e229134b3f80ad8a874460f307d5c66919ffcf /ui | |
parent | 1a54112c1d437d48c7dee4d7d37aeeab0b3507d8 (diff) |
Qt: Do not close file while trying to open new one
Wireshark QT will close current opened file when popup open dialogue (File -> open), instead of keeping current file opened till new file is to be opened
Bug: 10962
Change-Id: I2062514ae648c95492e0160953c80d5303b8aba2
Reviewed-on: https://code.wireshark.org/review/7452
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/main_window_slots.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index 17802f7423..5e9b821183 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -129,8 +129,6 @@ void MainWindow::openCaptureFile(QString& cf_path, QString& read_filter, unsigne // was a file name given as function parameter? name_param = !cf_path.isEmpty(); - if (!testCaptureFileClose(false)) return; - for (;;) { if (cf_path.isEmpty()) { @@ -163,6 +161,10 @@ void MainWindow::openCaptureFile(QString& cf_path, QString& read_filter, unsigne } } + if (!testCaptureFileClose(false)) { + return; + } + if (dfilter_compile(read_filter.toUtf8().constData(), &rfcode, &err_msg)) { cf_set_rfcode(CaptureFile::globalCapFile(), rfcode); } else { |