diff options
author | Kevin Sawicki | 2012-01-25 22:35:05 +0000 |
---|---|---|
committer | Matthias Sohn | 2012-01-25 22:35:05 +0000 |
commit | 1221a8cac0c16fa63a1c693829df66f68f0bc853 (patch) | |
tree | 5a6885b7932f0d5eb3a5bb958c7ee4e4d73f1e3b /org.eclipse.egit.ui | |
parent | 44d23c2ae91f4c065843e888a76185c4a20ab488 (diff) | |
download | egit-1221a8cac0c16fa63a1c693829df66f68f0bc853.tar.gz egit-1221a8cac0c16fa63a1c693829df66f68f0bc853.tar.xz egit-1221a8cac0c16fa63a1c693829df66f68f0bc853.zip |
Don't set shell as invisible before disposing
Just calling Shell.dispose is sufficient and should be
done when the graph table is disposed to prevent dangling
tooltips
Bug: 369647
Change-Id: I07edf7930ca9b88f914f0db8b48e025661b7ca89
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui')
-rw-r--r-- | org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java index 7bfc737924..79a3c02d2e 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitGraphTable.java @@ -213,11 +213,7 @@ class CommitGraphTable { @Override public void mouseHover(MouseEvent e) { synchronized (this) { - if (hoverShell != null) { - hoverShell.setVisible(false); - hoverShell.dispose(); - hoverShell = null; - } + disposeHover(); TableItem item = table.getTable().getItem( new Point(e.x, e.y)); @@ -264,11 +260,7 @@ class CommitGraphTable { table.getTable().addMouseMoveListener(new MouseMoveListener() { public void mouseMove(MouseEvent e) { synchronized (this) { - if (hoverShell == null || hoverShell.isDisposed()) - return; - hoverShell.setVisible(false); - hoverShell.dispose(); - hoverShell = null; + disposeHover(); } } }); @@ -280,6 +272,7 @@ class CommitGraphTable { allCommits.dispose(); if (renderer != null) renderer.dispose(); + disposeHover(); } }); @@ -353,6 +346,13 @@ class CommitGraphTable { getTableView(), site, copy)); } + void disposeHover() { + if (hoverShell == null) + return; + hoverShell.dispose(); + hoverShell = null; + } + Control getControl() { return table.getControl(); } |