diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2021-06-07 14:22:20 +0200 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-06-07 13:52:59 +0000 |
commit | 44a615e854e1e8281cf7d88dcb435fbbaba9e2ab (patch) | |
tree | a23a37b5dd71359a1bdf71619f493bc2986379bb /ui/qt/rtp_analysis_dialog.cpp | |
parent | 8c79fa5e1b9890668444e374b6df9e63b80a133c (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.cpp | 3 |
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); } } } |