From 5cd2c395b1c3a25c056e53391f69c51f0db398fe Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 23 Jul 2021 10:50:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-55629=20=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=88=86=E7=A6=BB=E3=80=91=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A4=8D=E7=94=A8-=E6=8E=A7=E4=BB=B6/=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=88=9A=E6=8B=96=E5=85=A5=E8=AE=BE=E8=AE=A1=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=B7=A5=E5=85=B7=E6=A0=8F=E6=B2=A1=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E5=AE=8C=E5=85=A8=EF=BC=8C=E5=8F=AA=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=BA=86=E4=B8=80=E6=9D=A1=E7=BA=BF=EF=BC=8C=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E7=9A=84=E8=AF=9D=E6=89=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/designer/creator/XCreator.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java index fa9267b1a7..185c834f75 100644 --- a/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java +++ b/designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java @@ -33,6 +33,7 @@ import com.fr.stable.StringUtils; import javax.swing.BorderFactory; import javax.swing.JComponent; import javax.swing.JPanel; +import javax.swing.SwingUtilities; import javax.swing.border.Border; import java.awt.BorderLayout; import java.awt.Color; @@ -776,10 +777,16 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo } int extraX = (int) ((bounds.x + bounds.width + SelectedPopupDialog.OFFSET_X) * designer.getScale()); int extraY = (int) (bounds.y * designer.getScale()); - popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); - popup.updatePane(designer); - popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible()); - popup.setRelativeBounds(bounds); + // 放到事件尾部执行 + SwingUtilities.invokeLater(new Runnable() { + @Override + public void run() { + popup.setLocation(designer.getLocationOnScreen().x + designer.getPaintX() + extraX, designer.getLocationOnScreen().y + designer.getPaintY() + extraY); + popup.updatePane(designer); + popup.setVisible(selected && accept && popup.hasVisibleButtons() && popup.isCanVisible()); + popup.setRelativeBounds(bounds); + } + }); } /** From bace88981dd5994bbbe2e577617df973df797477 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 23 Jul 2021 10:50:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-55228=20=E3=80=90=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E5=88=86=E7=A6=BB=E3=80=91=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=A4=8D=E7=94=A8-=E5=81=B6=E7=8E=B0=EF=BC=8C=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E6=A0=8F=E4=BC=9A=E7=95=99=E5=9C=A8=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/PluginClassRefreshManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/PluginClassRefreshManager.java b/designer-base/src/main/java/com/fr/design/PluginClassRefreshManager.java index 4ff6beda24..9e1d57dfd9 100644 --- a/designer-base/src/main/java/com/fr/design/PluginClassRefreshManager.java +++ b/designer-base/src/main/java/com/fr/design/PluginClassRefreshManager.java @@ -27,6 +27,8 @@ public class PluginClassRefreshManager { private final PluginEventListener pluginAfterRunEventListener = new PluginEventListener() { @Override public void on(PluginEvent event) { + // 重载模版之前 触发下hide + HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTabChange(); // 兼容之前版本特性 for (String tag : context) { if (event.getContext().contain(tag)) { @@ -51,6 +53,7 @@ public class PluginClassRefreshManager { public void on(PluginEvent event) { PluginListenerRegistration.getInstance().listen(PluginEventType.AfterRun, pluginAfterRunEventListener); if (DesignerLaunchStatus.getStatus() != DesignerLaunchStatus.WORKSPACE_INIT_COMPLETE) { + HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTabChange(); HistoryTemplateListCache.getInstance().reloadAllEditingTemplate(); } }