From 49f714c1da2673dd280bcf4c5ef087d88607b3de Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 15 Aug 2008 22:19:53 +0200 Subject: [PATCH] set first edition to -1 set empty path to prevent NPE when displaying select new project after adding --- src/de/todesbaum/jsite/gui/ProjectPage.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/de/todesbaum/jsite/gui/ProjectPage.java b/src/de/todesbaum/jsite/gui/ProjectPage.java index 16e4dec..4e3724f 100644 --- a/src/de/todesbaum/jsite/gui/ProjectPage.java +++ b/src/de/todesbaum/jsite/gui/ProjectPage.java @@ -516,11 +516,12 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D newProject.setName(I18n.getMessage("jsite.project.new-project.name")); newProject.setInsertURI(keyPair[0]); newProject.setRequestURI(keyPair[1]); - newProject.setEdition(0); + newProject.setEdition(-1); + newProject.setPath(""); projectListModel.add(newProject); projectScrollPane.revalidate(); projectScrollPane.repaint(); - projectList.setSelectedIndex(projectListModel.size() - 1); + projectList.setSelectedIndex(projectListModel.indexOf(newProject)); } /** -- 2.7.4