mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Fix that when you quickly move cursor from one hyperlink to another,
tooltip disappears.
This commit is contained in:
parent
75324f778e
commit
79568c82f2
1 changed files with 3 additions and 1 deletions
|
@ -35,6 +35,7 @@ public class ColorPane extends JEditorPane {
|
|||
HTMLEditorKit kit = new HTMLEditorKit();
|
||||
HTMLDocument doc = new HTMLDocument();
|
||||
private int tooltipDelay;
|
||||
private int tooltipCounter;
|
||||
|
||||
public ColorPane() {
|
||||
this.setEditorKit(kit);
|
||||
|
@ -90,7 +91,8 @@ public class ColorPane extends JEditorPane {
|
|||
if (location != null) {
|
||||
container.setLocation(location);
|
||||
}
|
||||
container.setVisible(show);
|
||||
tooltipCounter += show ? 1 : -1;
|
||||
container.setVisible(tooltipCounter > 0);
|
||||
c.repaint();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue