scopes: leave pattern text untouched when pattern is invalid (IDEA-72837 )

This commit is contained in:
anna
2011-08-03 22:02:15 +04:00
parent 11538de335
commit 6945d39f52
@@ -382,12 +382,14 @@ public class ScopeEditorPanel {
public void run() {
myIsInUpdate = true;
if (updateText) {
final String text = myCurrentScope != null ? myCurrentScope.getText() : "";
SwingUtilities.invokeLater(new Runnable() {
public void run() {
myPatternField.setText(text);
}
});
final String text = myCurrentScope != null ? myCurrentScope.getText() : null;
if (text != null) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
myPatternField.setText(text);
}
});
}
}
try {
if (!myProject.isDisposed()) {