From 79568c82f2bb1fe8b1dc08b7ee1ffbd6b400ef2f Mon Sep 17 00:00:00 2001 From: rkfg Date: Fri, 4 Mar 2016 21:37:49 +0300 Subject: [PATCH] Fix that when you quickly move cursor from one hyperlink to another, tooltip disappears. --- .../src/main/java/mage/client/components/ColorPane.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mage.Client/src/main/java/mage/client/components/ColorPane.java b/Mage.Client/src/main/java/mage/client/components/ColorPane.java index 06499ea058..dbdb044772 100644 --- a/Mage.Client/src/main/java/mage/client/components/ColorPane.java +++ b/Mage.Client/src/main/java/mage/client/components/ColorPane.java @@ -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(); } });