- // This is dodgy in that we're selecting the template on the
- // basis of the file extension, which may not be a standard
- // one. We really want to know exactly which template was
- // chosen by using a more advanced file selector.
- wxDocTemplate *theTemplate = FindTemplateForPath(path);
- if ( !theTemplate )
+ // first choose the template using the extension, if this fails (i.e.
+ // wxFileSelectorEx() didn't fill it), then use the path
+ if ( FilterIndex != -1 )