Browse Source

Merge branch 'release/11.0' of ssh://code.fineres.com:7999/~zheng/C-design into release/11.0

bugfix/11.0
shine 3 years ago
parent
commit
9c0cb17748
  1. 12
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java
  2. 2
      designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java
  3. 4
      designer-base/src/main/java/com/fr/design/style/color/ColorCell.java

12
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)) {
// 之前的写法有多线程问题,nameList异步尚未初始化完成的时候,这里可能无法匹配设置数据连接名称,导致DBTableDataPane打开后连接面板空白
// 这里的需求无非是设置上一次使用的数据连接,做个简单检查这个连接是否存在即可,存在就设置
if (ConnectionConfig.getInstance().getConnection(s) != null) {
this.setSelectedItem(s);
break;
}
}
}
// alex:如果这个ComboBox还是没有选中,那么选中第一个

2
designer-base/src/main/java/com/fr/design/javascript/JavaScriptActionPane.java

@ -42,7 +42,7 @@ public abstract class JavaScriptActionPane extends UIComboBoxPane<JavaScript> {
protected List<FurtherBasicBeanPane<? extends JavaScript>> initPaneList() {
List<FurtherBasicBeanPane<? extends JavaScript>> paneList = new ArrayList<FurtherBasicBeanPane<? extends JavaScript>>();
// JS脚本,表单提交,提交入库,流程管理,发送邮件. 703中去掉表单提交和流程管理
paneList.add(new JavaScriptImplPane(getDefaultArgs()));
paneList.add(new JavaScriptImplPane(getDefaultArgs(),true));
// paneList.add(new FormSubmitJavaScriptPane(this));
contentDBManiPane = new ArrayList();
contentDBManiPane.add(createDBManipulationPane());

4
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) {

Loading…
Cancel
Save