From 522c0536b53194d2bb61f76bc65fe9d143057f4e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 14 Jun 2008 13:55:19 +0200 Subject: [PATCH] fix combo box behaviour when selecting content type override --- src/net/pterodactylus/jsite/gui/FileManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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()) { -- 2.7.4