Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Stocker2013-12-07 17:15:21 +0000
committerMatthias Sohn2013-12-09 00:07:19 +0000
commitd6342de764dee470b4fa8194121e40a502f084c1 (patch)
tree60c9287fe77f98188460971d3668da8b5b0de104
parentdfabf79e4c01c381e84fd302001055de58b034c3 (diff)
downloadegit-d6342de764dee470b4fa8194121e40a502f084c1.tar.gz
egit-d6342de764dee470b4fa8194121e40a502f084c1.tar.xz
egit-d6342de764dee470b4fa8194121e40a502f084c1.zip
[stagingView] Fix rebase buttons being shown after startup
When the staging view is shown after startup and it's still initializing, the rebase buttons were shown for a time, and then hidden after initialization was finished. The reason was that updateRebaseButtonVisibility schedules the hiding using Display#asyncExec. When called from createPartControl, this is not necessary, so hide it directly there. Change-Id: Ibb6fc5f0fb2c28ace76159a4d71ad273718387c9 Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java
index 2fe2726f56..df568af91d 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingView.java
@@ -576,7 +576,7 @@ public class StagingView extends ViewPart implements IShowInSource {
rebaseContinueButton.setImage(getImage(UIIcons.REBASE_CONTINUE));
buttonGridData.applyTo(rebaseContinueButton);
- updateRebaseButtonVisibility(false);
+ showControl(rebaseSection, false);
commitMessageSection = toolkit.createSection(rebaseAndCommitComposite,
ExpandableComposite.TITLE_BAR);
@@ -1994,15 +1994,15 @@ public class StagingView extends ViewPart implements IShowInSource {
showControl(rebaseSection, isRebasing);
rebaseSection.getParent().layout(true);
}
-
- private void showControl(Control c, final boolean show) {
- c.setVisible(show);
- GridData g = (GridData) c.getLayoutData();
- g.exclude = !show;
- }
});
}
+ private static void showControl(Control c, final boolean show) {
+ c.setVisible(show);
+ GridData g = (GridData) c.getLayoutData();
+ g.exclude = !show;
+ }
+
/**
* @param isAmending
* if the current commit should be amended

Back to the top