diff --git a/designer-base/src/main/java/com/fr/design/mainframe/guide/base/GuideView.java b/designer-base/src/main/java/com/fr/design/mainframe/guide/base/GuideView.java index f8b93e34c3..6a9a60615f 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/guide/base/GuideView.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/guide/base/GuideView.java @@ -85,7 +85,12 @@ public class GuideView extends JDialog { updateGuideViewLocation(); this.setVisible(true); if (scene != null) { - scene.start(); + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + scene.start(); + } + }); } else { GuideManager.getInstance().getCurrentGuide().complete(); } diff --git a/designer-base/src/main/java/com/fr/design/mainframe/guide/scene/AbstractGuideScene.java b/designer-base/src/main/java/com/fr/design/mainframe/guide/scene/AbstractGuideScene.java index 7ae93ab06b..5ead71c621 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/guide/scene/AbstractGuideScene.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/guide/scene/AbstractGuideScene.java @@ -396,8 +396,9 @@ public abstract class AbstractGuideScene extends JPanel implements GuideScene { } public void clear() { - targetList = new ArrayList<>(); - highlightList = new ArrayList<>(); + targetList.clear(); + highlightList.clear(); + pointsList.clear(); this.nextButton = null; if (this.getComponentCount() > 0) { this.removeAll(); diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/ChangeLayoutComponentGuide.java b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/ChangeLayoutComponentGuide.java index 2058bf958b..ae7fb81387 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/ChangeLayoutComponentGuide.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/guide/creator/layout/ChangeLayoutComponentGuide.java @@ -87,9 +87,11 @@ public class ChangeLayoutComponentGuide { @Override public boolean prepared() { switchButton.getComponentPopupMenu().setVisible(true); + Rectangle popupBounds = GuideCreateUtils.getRelativeBounds(switchButton.getComponentPopupMenu(), switchButton,0, -switchButton.getComponentPopupMenu().getHeight()); + switchButton.getComponentPopupMenu().show(scene.getContainer(), popupBounds.x, popupBounds.y); scene.addCustomTarget( GuideCreateUtils.createModalTarget(switchButton.getComponentPopupMenu()), - GuideCreateUtils.getRelativeBounds(switchButton.getComponentPopupMenu(), switchButton,0, -switchButton.getComponentPopupMenu().getHeight()) + popupBounds ); scene.addClickTarget(switchButton.getComponentPopupMenu().getComponent(1), ClickScene.ClickType.LEFT, true); scene.addBubbleTip(Toolkit.i18nText("Fine-Design_Guide_Scene_F001002_Tip_Select_Fix_layout"), null, GuideTip.Direction.RIGHT, 0.5f, 0.8f);