mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed PY-8398 Change Signature: disable refactor and preview buttons in case of validation error in the dialog
This commit is contained in:
+6
@@ -194,6 +194,12 @@ public class PyChangeSignatureDialog extends ChangeSignatureDialogBase<PyParamet
|
||||
@Override
|
||||
protected ValidationInfo doValidate() {
|
||||
final String message = validateAndCommitData();
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
getRefactorAction().setEnabled(message == null);
|
||||
getPreviewAction().setEnabled(message == null);
|
||||
}
|
||||
});
|
||||
if (message != null) return new ValidationInfo(message);
|
||||
return super.doValidate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user