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:
@@ -27,6 +27,7 @@ import com.intellij.ui.JBColor;
|
||||
import com.intellij.ui.OnePixelSplitter;
|
||||
import com.intellij.util.Producer;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
@@ -195,7 +196,7 @@ public class OnePixelDivider extends Divider {
|
||||
removeAll();
|
||||
myVertical = vertical;
|
||||
final int cursorType = isVertical() ? Cursor.N_RESIZE_CURSOR : Cursor.W_RESIZE_CURSOR;
|
||||
setCursor(Cursor.getPredefinedCursor(cursorType));
|
||||
UIUtil.setCursor(this, Cursor.getPredefinedCursor(cursorType));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user