mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
EA-40946 - assert: EditorImpl.getLineHeight
This commit is contained in:
@@ -3260,7 +3260,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
public int getLineHeight() {
|
||||
assertReadAccess();
|
||||
int lineHeight = myLineHeight;
|
||||
if (lineHeight == -1) {
|
||||
if (lineHeight < 0) {
|
||||
FontMetrics fontMetrics = myEditorComponent.getFontMetrics(myScheme.getFont(EditorFontType.PLAIN));
|
||||
int fontMetricsHeight = fontMetrics.getHeight();
|
||||
lineHeight = (int)(fontMetricsHeight * (isOneLineMode() ? 1 : myScheme.getLineSpacing()));
|
||||
|
||||
Reference in New Issue
Block a user