aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/rtp_analysis_dialog.cpp
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2021-06-07 14:22:20 +0200
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-06-07 13:52:59 +0000
commit44a615e854e1e8281cf7d88dcb435fbbaba9e2ab (patch)
treea23a37b5dd71359a1bdf71619f493bc2986379bb /ui/qt/rtp_analysis_dialog.cpp
parent8c79fa5e1b9890668444e374b6df9e63b80a133c (diff)
Qt: Give a directory to wsApp->setLastOpenDir()
Use wsApp->setLastOpenDirFromFilename() to convert a filename to a directory name before calling wsApp->setLastOpenDir(). This will ensure to always store a directory instead of a filename in the recent gui.fileopen_remembered_dir.
Diffstat (limited to 'ui/qt/rtp_analysis_dialog.cpp')
-rw-r--r--ui/qt/rtp_analysis_dialog.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/ui/qt/rtp_analysis_dialog.cpp b/ui/qt/rtp_analysis_dialog.cpp
index 920d8cab94..adb2e46004 100644
--- a/ui/qt/rtp_analysis_dialog.cpp
+++ b/ui/qt/rtp_analysis_dialog.cpp
@@ -651,8 +651,7 @@ void RtpAnalysisDialog::on_actionSaveGraph_triggered()
// ui->streamGraph->legend->setVisible(false);
// else error dialog?
if (save_ok) {
- path = QDir(file_name);
- wsApp->setLastOpenDir(path.canonicalPath().toUtf8().constData());
+ wsApp->setLastOpenDirFromFilename(file_name);
}
}
}