From ac7f1753d3f742e0af8dd5e142b4eac9d9d2fbba Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 28 Oct 2011 21:41:31 -0400 Subject: [PATCH] Preserve feed selections when not saving passwords --- src/com/gitblit/client/GitblitManager.java | 9 +++++++-- src/com/gitblit/client/GitblitPanel.java | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/com/gitblit/client/GitblitManager.java b/src/com/gitblit/client/GitblitManager.java index a337040f..8f396f34 100644 --- a/src/com/gitblit/client/GitblitManager.java +++ b/src/com/gitblit/client/GitblitManager.java @@ -199,11 +199,16 @@ public class GitblitManager extends JFrame implements RegistrationsDialog.Regist EditRegistrationDialog dialog = new EditRegistrationDialog(this, reg, true); dialog.setLocationRelativeTo(GitblitManager.this); dialog.setVisible(true); - reg = dialog.getRegistration(); - if (reg == null) { + GitblitRegistration newReg = dialog.getRegistration(); + if (newReg == null) { // user canceled return; } + // preserve feeds + newReg.feeds = reg.feeds; + + // use new reg + reg = newReg; } // login diff --git a/src/com/gitblit/client/GitblitPanel.java b/src/com/gitblit/client/GitblitPanel.java index 198b24b3..10e9c2d4 100644 --- a/src/com/gitblit/client/GitblitPanel.java +++ b/src/com/gitblit/client/GitblitPanel.java @@ -620,9 +620,9 @@ public class GitblitPanel extends JPanel implements CloseTabListener { editRepository.setVisible(false); delRepository.setVisible(false); - while (tabs.getTabCount() > 1) { + while (tabs.getTabCount() > 2) { // remove all management/administration tabs - tabs.removeTabAt(1); + tabs.removeTabAt(2); } } -- 2.39.5