mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-167950 Freeze on entering emoji to UI Designer
This commit is contained in:
+6
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -77,7 +77,11 @@ public final class StringEditor extends PropertyEditor<StringDescriptor> {
|
||||
textField.getDocument().addDocumentListener(
|
||||
new DocumentAdapter() {
|
||||
protected void textChanged(final DocumentEvent e) {
|
||||
preferredSizeChanged();
|
||||
// Order of document listeners invocation is not defined in Swing. In practice, custom listeners like this one are invoked
|
||||
// before internal JTextField listeners, so at this point the internal state of JTextField can be inconsistent.
|
||||
// That's the reason for using 'invokeLater' here.
|
||||
//noinspection SSBasedInspection
|
||||
SwingUtilities.invokeLater(() -> preferredSizeChanged());
|
||||
myTextFieldModified = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user