mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
avoid double listener remove
This commit is contained in:
@@ -550,6 +550,9 @@ public class CompilerTask extends Task.Backgroundable {
|
||||
|
||||
public boolean canCloseProject(final Project project) {
|
||||
assert project != null;
|
||||
if (!project.equals(myProject)) {
|
||||
return true;
|
||||
}
|
||||
if (shouldAskUser()) {
|
||||
int result = Messages.showOkCancelDialog(
|
||||
myProject,
|
||||
@@ -627,13 +630,15 @@ public class CompilerTask extends Task.Backgroundable {
|
||||
}
|
||||
|
||||
public void projectClosed(Project project) {
|
||||
if (myContent != null) {
|
||||
if (project.equals(myProject) && myContent != null) {
|
||||
myContentManager.removeContent(myContent, true);
|
||||
}
|
||||
}
|
||||
|
||||
public void projectClosing(Project project) {
|
||||
myIsApplicationExitingOrProjectClosing = true;
|
||||
if (project.equals(myProject)) {
|
||||
myIsApplicationExitingOrProjectClosing = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user