New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TGFileDialog new option to open / save to a folder, instead of a file #7237
Conversation
Can one of the admins verify this patch? |
@phsft-bot build |
Starting build on |
Build failed on ROOT-fedora31/noimt. Errors:
|
Build failed on ROOT-performance-centos8-multicore/default. Errors:
|
Build failed on ROOT-ubuntu16/nortcxxmod. Errors:
|
Build failed on ROOT-debian10-i386/cxx14. Errors:
|
Build failed on ROOT-fedora30/cxx14. Errors:
|
Build failed on mac11.0/cxx17. Errors:
|
Build failed on mac1014/python3. Errors:
|
Build failed on windows10/cxx14. Errors:
|
@phsft-bot build |
Starting build on |
Build failed on mac11.0/cxx17. Failing tests: |
Build failed on windows10/cxx14. Failing tests: |
I'll have to try it before to review, but before that, may I ask what is the real use case? We only had one question on the forum so far, with an alternative solution... |
There were two more forum posts also: The alternative solution involves defining extra derived classes, etc, which is a bit of a burden. Selecting a folder is useful, for example when you save all open canvases as .png files. You want to select a output folder, and then the script does: I think this functionality is generic enough to be used by more users. In fact, QtFileDialog has exactly this kind of property:
See https://forum.qt.io/topic/62138/qfiledialog-choose-directories-only-but-show-files-as-well/13 |
OK, thanks. I'll take care of it as soon as I can |
Thanks for the feedback. I think I fixed them now. |
Co-authored-by: Bertrand Bellenot <bellenot@users.noreply.github.com>
Co-authored-by: Bertrand Bellenot <bellenot@users.noreply.github.com>
@phsft-bot build |
Starting build on |
Build failed on mac11.0/cxx17. Failing tests: |
Build failed on windows10/cxx14. Failing tests:
|
@ferdymercury Thanks for this contribution! Test failures are unrelated, so let's merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the nice improvement!
…root-project#7237) * add directory selection as one dialog mode * implement folder dialog type * add extra security to prevent nullptr access * fix typo in last commit * redundant check to make clang tidy analyzer happy * correctly handle double-click, and disable button if file is selected * fix directory name when double click * align member * follow coding conventions * split two lines to avoid long lines Co-authored-by: Bertrand Bellenot <bellenot@users.noreply.github.com> * avoid long lines, split * simplify if clauses Co-authored-by: Bertrand Bellenot <bellenot@users.noreply.github.com> Co-authored-by: Bertrand Bellenot <bellenot@users.noreply.github.com>
Solves https://root-forum.cern.ch/t/gui-directory-dialog/17921/