From: David ‘Bombe’ Roden Date: Sat, 14 Jun 2008 11:55:19 +0000 (+0200) Subject: fix combo box behaviour when selecting content type override X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=522c0536b53194d2bb61f76bc65fe9d143057f4e;p=jSite2.git fix combo box behaviour when selecting content type override --- diff --git a/src/net/pterodactylus/jsite/gui/FileManager.java b/src/net/pterodactylus/jsite/gui/FileManager.java index 996d609..766677f 100644 --- a/src/net/pterodactylus/jsite/gui/FileManager.java +++ b/src/net/pterodactylus/jsite/gui/FileManager.java @@ -399,7 +399,11 @@ public class FileManager extends JDialog implements I18nable, TreeSelectionListe fileOverride = new FileOverride(); project.addFileOverride(projectFile, fileOverride); } - fileOverride.setContentType(MimeTypes.getMimeType(getFileExtension(projectFile.getName()))); + String projectFileName = projectFile.getName(); + String mimeType = MimeTypes.getMimeType(getFileExtension(projectFileName)); + fileOverride.setContentType(mimeType); + fillComboBox(projectFileName); + contentTypeOverrideComboBox.setSelectedItem(mimeType); } else { fileOverride.setContentType(null); if (fileOverride.isEmpty()) {