mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-29 16:01:19 -04:00
Top most string field gets focus if the attribute dialog is opened
This commit is contained in:
parent
c9b65df256
commit
37de39ad8a
@ -70,10 +70,11 @@ public class AttributeDialog extends JDialog {
|
||||
topMostTextComponent = null;
|
||||
for (Key key : list) {
|
||||
Editor e = EditorFactory.INSTANCE.create(key, elementAttributes.get(key));
|
||||
if (topMostTextComponent == null && e instanceof EditorFactory.StringEditor)
|
||||
topMostTextComponent = ((EditorFactory.StringEditor) e).getTextComponent();
|
||||
editors.add(new EditorHolder(e, key));
|
||||
e.addToPanel(panel, key, elementAttributes, this);
|
||||
|
||||
if (topMostTextComponent == null && e instanceof EditorFactory.StringEditor)
|
||||
topMostTextComponent = ((EditorFactory.StringEditor) e).getTextComponent();
|
||||
}
|
||||
|
||||
JButton okButton = new JButton(new AbstractAction(Lang.get("ok")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user