mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Use UIUtil.setCursor to prevent setting the cursor that is already set.
Cursor is updated by native code even if component has the same cursor, causing performance problems (IDEA-167733)
This commit is contained in:
+2
-2
@@ -263,7 +263,7 @@ public class RecentProjectPanel extends JPanel {
|
||||
|
||||
final Rectangle cellBounds = myList.getCellBounds(index, index);
|
||||
if (cellBounds != null && cellBounds.contains(point)) {
|
||||
myList.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
||||
UIUtil.setCursor(myList, Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
||||
if (rectInListCoordinatesContains(cellBounds, point)) {
|
||||
currentIcon = AllIcons.Welcome.Project.Remove_hover;
|
||||
} else {
|
||||
@@ -273,7 +273,7 @@ public class RecentProjectPanel extends JPanel {
|
||||
myList.repaint(cellBounds);
|
||||
}
|
||||
else {
|
||||
myList.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
UIUtil.setCursor(myList, Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
myHoverIndex = -1;
|
||||
myList.repaint();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user