Skip to content

Commit

Permalink
Merge pull request #2731 from ControlSystemStudio/CSSTUDIO-1976
Browse files Browse the repository at this point in the history
CSSTUDIO-1976 Escape newlines in TextField "text" to prevent newlines from being removed in Label widgets.
  • Loading branch information
abrahamwolk authored Jul 11, 2023
2 parents 147815d + 267cc97 commit 12e032e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ else if (property instanceof MacroizedWidgetProperty)
final MacroizedWidgetProperty<?> other_prop = (MacroizedWidgetProperty<?>) w.getProperty(macro_prop.getName());
undo.execute(new SetMacroizedWidgetPropertyAction(other_prop, result.get()));
}
text.setText(result.get());
text.setText(result.get().replaceAll("\n", "\\\\n"));
Tooltip.install(text, new Tooltip(result.get()));
});
field = new HBox(text, open_editor);
Expand Down

0 comments on commit 12e032e

Please sign in to comment.