mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 573546: Clear old selection in hover on annotation ruler
The select can be called twice when the expansion first opens, so clear out the old selection before processing the new one. If this isn't done, the oldStyles gets set to the highlighted version on the second call, which prevents deselect from removing the highlight. Change-Id: Ibc8ae45d4164d380b7946cd492c29f33c9fac981
This commit is contained in:
parent
043651694a
commit
2c63592dd6
1 changed files with 6 additions and 0 deletions
|
@ -110,6 +110,12 @@ public class AnnotationExpansionControl implements IInformationControl, IInforma
|
|||
StyleRange[] oldStyles;
|
||||
|
||||
public void selected() {
|
||||
if (fSelection != null) {
|
||||
// We can get two selection events back to back because of
|
||||
// code in org.eclipse.cdt.internal.ui.text.c.hover.AnnotationExpansionControl.setVisible(boolean)
|
||||
// which forces a select on first open
|
||||
deselect();
|
||||
}
|
||||
Display disp = fShell.getDisplay();
|
||||
canvas.setCursor(getHandCursor(disp));
|
||||
// TODO: shade - for now: set grey background
|
||||
|
|
Loading…
Add table
Reference in a new issue