Repository navigation
Add file dialog for TLE selection - #82
Conversation
|
Hi! At first glance I am open to the idea, however wouldnt it be simpler to delegate file picker to the OS itself instead of writing it from scratch? |
|
Yes, that is a good point! I did not think of this. The self-written one has the same "look and feel" as If you have a chance to check-out the current version, I'd still appreciate any other feedback or suggestions you might have. One issue I am already aware of is that the file content is not checked for the presence of the mandatory object name (line 0) prior to loading. I noticed that this is implemented for the |
|
From my initial testing it builds fine and appears to work alright, there definitely is a big performance issue when opening a subdirectory (likely UI file picker related, so I'd skip analysing this for now). I tested KVN OMM and CSV OMM and they worked just fine so the rest likely does as well. as for the check; I would put it in Paste can check early because the text is already in memory. A file only stores the path, and the file isn't read until pull time - and that read happens in One more thing I noticed when writing this response: |
|
Okay, this is a re-worked implementation based on portable-file-dialogs, which uses the native OS file picker. I was able to condense the code in the file dialog implementation down to just a fraction of what it used to be. File dialog settings like title and file filters are customizable, so it can be used for other file inputs as well. I am actually using this also for my custom tool, where I need to load other file-based data. I have tested it on Ubuntu Linux and Windows 11. The check for 3LE format is now also implemented and I have moved it in the end to Please let me know if you think this could be part of the new release. Before merging this into |
|
I really like it! I have some minor tweaks I'd like to do, like fixing the file dialog on windows filering for "TLE files" by default, which isnt intended i think- But I'm down to merge it as is and polish it from there. As for the separate branch- i dont think that's needed, I can simply squash merge it into one commit. If you're alright with that I'll go ahead and merge it as is :) |
|
Great! Yes, please go ahead and do the squash merge. Concerning the default file filter, I did intentionally set the filter to only show the TLE files, but please adapt as you see fit. |
Dear TLEscope developers, dear Aria,
my most frequent use of TLEscope will be working with historical TLE data using local files. I have therefore implemented a simple file dialog as an additional element in the
Data Sourcespanel. I believe this could be interesting for other users as well and I would be happy if you could consider including this feature in the upcoming new release of TLEscope.This pull request is intended to share and discuss the current status with you. I would appreciate your feedback and suggestions about the implementation and I am happy to make further modifications to it if needed.
I have tested loading files on Ubuntu Linux and Windows 11. I have so far only checked the 3LE format, but since I am re-using the format auto-detection code I am somewhat optimistic that it will also work for the other supported formats.
I hope you find this useful and I am looking forward to hearing from you.