- if (filter != null && !filter.equals("")) {
- Config.setConfigString(Config.KEY_GPSBABEL_FILTER, filter);
+ Config.setConfigString(Config.KEY_GPSBABEL_FILTER, filter);
+
+ // Check if there is a standard file type for the selected suffix
+ int selIndex = BabelFileFormats.getIndexForFileSuffix(getSelectedSuffix());
+ // If there is none, then get the index which the user chose and set in the Config
+ if (selIndex < 0) {
+ Config.setConfigInt(Config.KEY_IMPORT_FILE_FORMAT, _formatDropdown.getSelectedIndex());