Skip to content

Commit

Permalink
Switched priority of insertionStyle and initialStyle (#871)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jugen committed Nov 22, 2019
1 parent b8f563d commit 323edc7
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1288,10 +1288,10 @@ public void setParagraphStyle(int paragraph, PS paragraphStyle) {

@Override
public final S getTextStyleForInsertionAt(int pos) {
if(useInitialStyleForInsertion.get()) {
return initialTextStyle;
} else if ( insertionTextStyle != null ) {
if ( insertionTextStyle != null ) {
return insertionTextStyle;
} else if ( useInitialStyleForInsertion.get() ) {
return initialTextStyle;
} else {
return content.getStyleAtPosition(pos);
}
Expand All @@ -1306,10 +1306,10 @@ public final S getTextStyleForInsertionAt(int pos) {

@Override
public final PS getParagraphStyleForInsertionAt(int pos) {
if(useInitialStyleForInsertion.get()) {
return initialParagraphStyle;
} else if ( insertionParagraphStyle != null ) {
if ( insertionParagraphStyle != null ) {
return insertionParagraphStyle;
} else if ( useInitialStyleForInsertion.get() ) {
return initialParagraphStyle;
} else {
return content.getParagraphStyleAtPosition(pos);
}
Expand Down

0 comments on commit 323edc7

Please sign in to comment.