git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: spearce@spearce.org
Cc: git@vger.kernel.org, Robin Rosenberg <robin.rosenberg@dewire.com>
Subject: [EGIT PATCH] Select and show a newly created branch in the checkout dialog
Date: Sat,  4 Apr 2009 13:55:25 +0200	[thread overview]
Message-ID: <1238846125-30149-1-git-send-email-robin.rosenberg@dewire.com> (raw)

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../ui/internal/dialogs/BranchSelectionDialog.java |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/BranchSelectionDialog.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/BranchSelectionDialog.java
index cbbc384..1866086 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/BranchSelectionDialog.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/dialogs/BranchSelectionDialog.java
@@ -150,6 +150,7 @@ private void fillTreeWithBranches(String select) throws IOException {
 		TreeItem curSubItem = null;
 		String curPrefix = null;
 		String curSubPrefix = null;
+		TreeItem itemToSelect = null;
 
 		for (String ref : branches) {
 			String shortName = ref;
@@ -217,7 +218,12 @@ public void widgetDisposed(DisposeEvent e) {
 			}
 			else item.setText(shortName);
 			if (ref.equals(select))
-				branchTree.select(item);
+				itemToSelect = item;
+			branchTree.setLinesVisible(true);
+		}
+		if (itemToSelect != null) {
+			branchTree.select(itemToSelect);
+			branchTree.showItem(itemToSelect);
 		}
 	}
 
-- 
1.6.2.1.345.g89fb

                 reply	other threads:[~2009-04-04 11:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1238846125-30149-1-git-send-email-robin.rosenberg@dewire.com \
    --to=robin.rosenberg@dewire.com \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).