don't set default cursor if empty text is invisible

This commit is contained in:
Konstantin Bulenkov
2013-11-06 15:25:44 +01:00
parent 4f009e8c77
commit c3c03a0db1
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -67,11 +67,13 @@ public abstract class StatusText {
myMouseMotionListener = new MouseAdapter() {
@Override
public void mouseMoved(final MouseEvent e) {
if (findActionListenerAt(e.getPoint()) != null) {
myMouseTarget.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
}
else {
myMouseTarget.setCursor(Cursor.getDefaultCursor());
if (isStatusVisible()) {
if (findActionListenerAt(e.getPoint()) != null) {
myMouseTarget.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
}
else {
myMouseTarget.setCursor(Cursor.getDefaultCursor());
}
}
}
};