From b26a85d3f668ffe41d402d7089420744ec45acd9 Mon Sep 17 00:00:00 2001 From: rinoux Date: Fri, 18 Mar 2022 11:27:12 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-67954=20=E8=BF=9C=E7=A8=8B=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E6=97=B6=E6=95=B0=E6=8D=AE=E9=9B=86=E9=9D=A2=E6=9D=BF?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5=E7=A9=BA=E7=99=BD=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20=E6=8F=90=E4=BA=A411?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datapane/connect/ConnectionComboBoxPanel.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java index 3b5aebed9e..fe69024a82 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java @@ -10,11 +10,10 @@ import com.fr.design.editlock.EditLockUtils; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UILockButton; import com.fr.file.ConnectionConfig; -import com.fr.general.ComparatorUtils; +import com.fr.report.LockItem; import com.fr.stable.StringUtils; import com.fr.workspace.WorkContext; import com.fr.workspace.server.connection.DBConnectAuth; -import com.fr.report.LockItem; import javax.swing.SwingUtilities; import java.awt.Dimension; @@ -96,6 +95,7 @@ public class ConnectionComboBoxPanel extends ItemEditableComboBoxPanel { continue; } Connection connection = mgr.getConnection(conName); + // nameList依赖items方法初始化,父类ItemEditableComboBoxPanel里异步执行item方法 filterConnection(connection, conName, nameList); } @@ -140,12 +140,10 @@ public class ConnectionComboBoxPanel extends ItemEditableComboBoxPanel { } else { String s = DesignerEnvManager.getEnvManager().getRecentSelectedConnection(); if (StringUtils.isNotBlank(s)) { - for (int i = 0; i < this.getConnectionSize(); i++) { - String t = this.getConnection(i); - if (ComparatorUtils.equals(s, t)) { - this.setSelectedItem(s); - break; - } + // 之前的写法有多线程问题,nameList异步尚未初始化完成的时候,这里可能无法匹配设置数据连接名称,导致DBTableDataPane打开后连接面板空白 + // 这里的需求无非是设置上一次使用的数据连接,做个简单检查这个连接是否存在即可,存在就设置 + if (ConnectionConfig.getInstance().getConnection(s) != null) { + this.setSelectedItem(s); } } // alex:如果这个ComboBox还是没有选中,那么选中第一个 From cad840da238e03d6dc86df14077dcd62d65b4cf7 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 18 Mar 2022 15:25:18 +0800 Subject: [PATCH 2/3] =?UTF-8?q?REPORT-67833=20=E5=AF=8C=E6=96=87=E6=9C=AC-?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E8=AE=BE=E7=BD=AE=EF=BC=9A=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E8=89=B2=E5=90=8E=E6=9C=80=E8=BF=91=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E9=A2=9C=E8=89=B2=E5=A4=84=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=EF=BC=8C=E9=9C=80=E8=A6=81=E5=A4=9A=E6=AC=A1?= =?UTF-8?q?=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/style/color/ColorCell.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/style/color/ColorCell.java b/designer-base/src/main/java/com/fr/design/style/color/ColorCell.java index 4cc3e41cea..acc26ca5aa 100644 --- a/designer-base/src/main/java/com/fr/design/style/color/ColorCell.java +++ b/designer-base/src/main/java/com/fr/design/style/color/ColorCell.java @@ -100,11 +100,13 @@ public class ColorCell extends JComponent implements ColorSelectable { if (e == null || e.getID() == MouseEvent.MOUSE_RELEASED) { colorSelectable.setColor(this.getColor()); - colorSelectable.colorSetted(this); + // 先添加最近使用 if (this.getColor() != null) { int rgb = this.getColor().getRGB(); DesignerEnvManager.getEnvManager().getColorConfigManager().addToColorQueue(new Color(rgb)); } + // 这边会获取到最近使用颜色并更新 添加逻辑需要放到前面 否则不会及时更新 + colorSelectable.colorSetted(this); } if (e != null) { From 39b29d40664f9bd7041073c5c3c6cdb54ff10ba2 Mon Sep 17 00:00:00 2001 From: pengda Date: Fri, 18 Mar 2022 17:02:10 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-68059=20js=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=EF=BC=8C=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E7=9A=84=E5=BC=B9=E7=AA=97=E5=B1=82=E7=BA=A7?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/javascript/JavaScriptActionPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java index 999a1a0295..e2f8dd9067 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java @@ -42,7 +42,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane { protected List> initPaneList() { List> paneList = new ArrayList>(); // JS脚本,表单提交,提交入库,流程管理,发送邮件. 703中去掉表单提交和流程管理 - paneList.add(new JavaScriptImplPane(getDefaultArgs())); + paneList.add(new JavaScriptImplPane(getDefaultArgs(),true)); // paneList.add(new FormSubmitJavaScriptPane(this)); contentDBManiPane = new ArrayList(); contentDBManiPane.add(createDBManipulationPane());