Skip to content

Commit d0939c8

Browse files
authored
425 requestlayout (#426)
* Do not layout ParagraphTile outside a pulse. Fix #425
1 parent ed18c78 commit d0939c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rta/src/main/java/com/gluonhq/richtextarea/ParagraphTile.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ void setParagraph(Paragraph paragraph, List<Node> fragments, List<Integer> posit
141141
HBox gridBox = createGridBox(fragments, positions, background, decoration);
142142
contentPane.getChildren().add(gridBox);
143143
contentPane.setPrefWidth(gridBox.getPrefWidth());
144-
contentPane.layout();
144+
contentPane.requestLayout();
145145
}
146146
} else {
147147
Layer layer = new Layer(paragraph.getStart(), paragraph.getEnd(), false);
@@ -151,7 +151,7 @@ void setParagraph(Paragraph paragraph, List<Node> fragments, List<Integer> posit
151151
contentPane.setPrefWidth(layer.getPrefWidth());
152152
updateGraphicBox(layer, control.getParagraphGraphicFactory());
153153
graphicBox.setPadding(new Insets(decoration.getTopInset(), 2, decoration.getBottomInset(), 0));
154-
contentPane.layout();
154+
contentPane.requestLayout();
155155
}
156156
}
157157

0 commit comments

Comments
 (0)