mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
safe delete should not start callback when "safe" checkbox is not on
This commit is contained in:
@@ -197,7 +197,7 @@ public class SafeDeleteDialog extends DialogWrapper {
|
||||
|
||||
@Override
|
||||
protected void doOKAction() {
|
||||
if (myCallback != null) {
|
||||
if (myCallback != null && isSafeDelete()) {
|
||||
myCallback.run(this);
|
||||
} else {
|
||||
super.doOKAction();
|
||||
@@ -220,4 +220,11 @@ public class SafeDeleteDialog extends DialogWrapper {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isSafeDelete() {
|
||||
if (isDelete()) {
|
||||
return myCbSafeDelete.isSelected();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user