Browse Source

REPORT-60896 mac目录蒙层结束后有遗留透明块

final/11.0
kuangshuai 3 years ago
parent
commit
7ace9cb7eb
  1. 16
      designer-base/src/main/java/com/fr/design/mainframe/guide/base/Guide.java

16
designer-base/src/main/java/com/fr/design/mainframe/guide/base/Guide.java

@ -10,6 +10,8 @@ import com.fr.stable.StringUtils;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import java.awt.event.HierarchyEvent;
import java.awt.event.HierarchyListener;
public class Guide {
private String id;
@ -101,7 +103,7 @@ public class Guide {
}
GuideManager.getInstance().setCurrentGuide(this);
guideView.showLoading();
guideView.addHierarchyListener(loadingHierarchyListener);
new SwingWorker<Boolean, Void>() {
@Override
protected Boolean doInBackground() {
@ -135,6 +137,9 @@ public class Guide {
public void start() {
guideView.hideLoading();
}
private void startScene() {
if (scene != null) {
guideView.setScene(scene);
guideView.showGuide();
@ -161,6 +166,7 @@ public class Guide {
if (lifecycle != null) {
lifecycle.onTerminate();
}
guideView.removeHierarchyListener(loadingHierarchyListener);
end();
}
@ -186,4 +192,12 @@ public class Guide {
public void removeGuideLifecycle() {
this.lifecycle = null;
}
private HierarchyListener loadingHierarchyListener = new HierarchyListener() {
@Override
public void hierarchyChanged(HierarchyEvent e) {
guideView.removeHierarchyListener(loadingHierarchyListener);
startScene();
}
};
}

Loading…
Cancel
Save