]> source.dussan.org Git - gitblit.git/commitdiff
Preserve feed selections when not saving passwords
authorJames Moger <james.moger@gitblit.com>
Sat, 29 Oct 2011 01:41:31 +0000 (21:41 -0400)
committerJames Moger <james.moger@gitblit.com>
Sat, 29 Oct 2011 01:41:31 +0000 (21:41 -0400)
src/com/gitblit/client/GitblitManager.java
src/com/gitblit/client/GitblitPanel.java

index a337040f9dcc76755c56ab768632ac3da8ad6a64..8f396f34268f8220d2567b165e786c3c74e7f1b4 100644 (file)
@@ -199,11 +199,16 @@ public class GitblitManager extends JFrame implements RegistrationsDialog.Regist
                        EditRegistrationDialog dialog = new EditRegistrationDialog(this, reg, true);\r
                        dialog.setLocationRelativeTo(GitblitManager.this);\r
                        dialog.setVisible(true);\r
-                       reg = dialog.getRegistration();\r
-                       if (reg == null) {\r
+                       GitblitRegistration newReg = dialog.getRegistration();\r
+                       if (newReg == null) {\r
                                // user canceled\r
                                return;\r
                        }\r
+                       // preserve feeds\r
+                       newReg.feeds = reg.feeds;\r
+                       \r
+                       // use new reg\r
+                       reg = newReg;\r
                }\r
 \r
                // login\r
index 198b24b3c881a38035e9afbafb518620d74120c8..10e9c2d4863e86b38421ccc090583da23d3d9851 100644 (file)
@@ -620,9 +620,9 @@ public class GitblitPanel extends JPanel implements CloseTabListener {
                        editRepository.setVisible(false);\r
                        delRepository.setVisible(false);\r
 \r
-                       while (tabs.getTabCount() > 1) {\r
+                       while (tabs.getTabCount() > 2) {\r
                                // remove all management/administration tabs\r
-                               tabs.removeTabAt(1);\r
+                               tabs.removeTabAt(2);\r
                        }\r
                }\r
 \r