set first edition to -1
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Fri, 15 Aug 2008 20:19:53 +0000 (22:19 +0200)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Fri, 15 Aug 2008 20:19:53 +0000 (22:19 +0200)
set empty path to prevent NPE when displaying
select new project after adding

src/de/todesbaum/jsite/gui/ProjectPage.java

index 16e4dec..4e3724f 100644 (file)
@@ -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));
        }
 
        /**