Skip to content

Commit

Permalink
Fixed possible layout loop in LabeledSkinBase
Browse files Browse the repository at this point in the history
  • Loading branch information
salmonb committed Dec 11, 2023
1 parent 8257877 commit db9f32d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ private Text getTextToMeasure(Font font, String text, double wrappingWidth) { //
textToMesure.setFont(font);
//textToMesure.setTextAlignment(getSkinnable().getTextAlignment());
// Reusing also noWrappingText if the passed wrapping width is greater (=> for sure text will stay on 1 line) and text & font identical
} else if (noWrappingTextWidth > 0 && wrappingWidth > noWrappingTextWidth && Objects.equals(noWrappingText.getText(), text) && Objects.equals(noWrappingText.getFont(), font)) {
} else if (noWrappingTextWidth > 0 && wrappingWidth >= noWrappingTextWidth && Objects.equals(noWrappingText.getText(), text) && Objects.equals(noWrappingText.getFont(), font)) {
textToMesure = noWrappingText;
} else { // Otherwise using this.text to measure and apply wrapping width & text to it (should be final values to apply for html mapping)
textToMesure = this.text;
Expand Down

0 comments on commit db9f32d

Please sign in to comment.