Open igor-martinovski opened 2 years ago
I just noticed this problem as well. Except my issue is slightly different. I am trying to select multiple directories. The main difference I see is that my 'selections' output is goofed up. But I managed to fix it with a little path splitting.
App Data: {
'file_path_name': 'C:\\2 files Selected',
'file_name': '',
'current_path': 'C:\\2 files Selected',
'current_filter': '',
'min_size': [100.0, 100.0],
'max_size': [30000.0, 30000.0],
'selections': {
'Users': 'C:\\2 files Selected\\Users',
'Windows': 'C:\\2 files Selected\\Windows'
}
}
See also my similar comment here. https://github.com/hoffstadt/DearPyGui/issues/1491
Version: dearpygui 1.1.3 Operating System: Windows 10
My Issue/Question
File Dialog call back
app_data
is confusing. When one file is selected theapp_data
dict contains an incorrect filename, it includes the filter as the extension. Thefile_path_name
also contains the filter as the extension.When multiple files are selected, the
file_name
andfile_path_name
also append the filter but it makes no sense (see output below)Expected behavior
file_name
should be the exact filename,file_path_name
should be a list of paths (or something? not sure how useful it is given theselections
dict.)The selections dict can also leverage pathlib objects for additional flexibility
Standalone, minimal, complete and verifiable example