Skip to content

Commit 9898fe0

Browse files
author
Jürgen Obernolte
committed
Removed unnecessary initial paragraph style.
1 parent ba4794e commit 9898fe0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

richtextfx/src/main/java/org/fxmisc/richtext/skin/ParagraphBox.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ public ObjectProperty<IntFunction<? extends Node>> graphicFactoryProperty() {
7070
public void setIndex(int index) { this.index.setValue(index); }
7171
public int getIndex() { return index.getValue(); }
7272

73-
public ParagraphBox(Paragraph<S, PS> par, BiConsumer<? super TextExt, S> applyStyle, PS initialParagraphStyle, BiConsumer<TextFlow, PS> applyParagraphStyle) {
73+
public ParagraphBox(Paragraph<S, PS> par, BiConsumer<? super TextExt, S> applyStyle, BiConsumer<TextFlow, PS> applyParagraphStyle) {
7474
this.getStyleClass().add("paragraph-box");
7575
this.text = new ParagraphText<>(par, applyStyle);
76-
applyParagraphStyle.accept(this.text, initialParagraphStyle);
76+
applyParagraphStyle.accept(this.text, par.getParagraphStyle());
7777
this.index = Var.newSimpleVar(0);
7878
getChildren().add(text);
7979
graphic = Val.combine(

richtextfx/src/main/java/org/fxmisc/richtext/skin/StyledTextAreaView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ private Cell<Paragraph<S, PS>, ParagraphBox<S, PS>> createCell(
367367
PS initialParagraphStyle,
368368
BiConsumer<TextFlow, PS> applyParagraphStyle) {
369369

370-
ParagraphBox<S, PS> box = new ParagraphBox<>(paragraph, applyStyle, paragraph.getParagraphStyle(), applyParagraphStyle);
370+
ParagraphBox<S, PS> box = new ParagraphBox<>(paragraph, applyStyle, applyParagraphStyle);
371371

372372
box.highlightFillProperty().bind(highlightFill);
373373
box.highlightTextFillProperty().bind(highlightTextFill);

0 commit comments

Comments
 (0)