I remember I once fixed some bugs so that the last extension was remembered (for generic open)
Don't worry: It still works very well. That's what I'm saying: The last filter selection IS stored as name, not the index. Then from the name the index is being computed. If there is no name stored, the default index (which is zero) is used. Anyway, for the file-open dialog you have to come to an (integer) index in the end allthough you save the filter as literal (again: as it is done).
So in the end it only happens the very first time that you are presented the AngelScript filter because this has index zero (the default). I could only imagine doing in
MainFrame::OnFileOpen(wxCommandEvent& event) not a
int StoredIndex = 0; but something like
int StoredIndex = GetDefaultFilterIndex(); which would resolve to
what?
There are so many good reason to resolve to any of the following:
- C::B workspace
- C::B projects
- C/C++ source/header files
(...)
But again I'm saying: We don't know what a good default value is. If we set iot to "something" next time people will complain different.
The only thing I could imagine to have the default index set to "All files" which is always appended to the filter index list. This is already returned by
FileFilters::GetIndexForFilterAll(). How about that?
With regards, Morten.