mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-05 04:38:10 +08:00
PL-7074 Assigning input prompt to desktop text field also changes its description
This commit is contained in:
parent
aa15ff5137
commit
cd8825eb58
@ -95,7 +95,13 @@ public class DesktopTextField extends DesktopAbstractTextField<JTextComponent> i
|
||||
this.inputPrompt = inputPrompt;
|
||||
|
||||
if (StringUtils.isNotBlank(inputPrompt)) {
|
||||
// Save old tooltipText value to use it later
|
||||
String toolTipText = this.impl.getToolTipText();
|
||||
|
||||
PromptSupport.setPrompt(inputPrompt, impl);
|
||||
|
||||
// Use old tooltipText value because it was overwritten in org.jdesktop.swingx.prompt.PromptSupport.setPrompt()
|
||||
this.impl.setToolTipText(toolTipText);
|
||||
} else {
|
||||
PromptSupport.setPrompt(null, impl);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user