diff --git a/designer-base/src/main/java/com/fr/design/gui/ibutton/UILockButton.java b/designer-base/src/main/java/com/fr/design/gui/ibutton/UILockButton.java index 77b5516f51..5f34b8320b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ibutton/UILockButton.java +++ b/designer-base/src/main/java/com/fr/design/gui/ibutton/UILockButton.java @@ -4,6 +4,7 @@ import com.fr.design.editlock.EditLockChangeEvent; import com.fr.design.editlock.EditLockChangeListener; import com.fr.design.editlock.EditLockUtils; import com.fr.report.LockItem; +import com.fr.start.common.DesignerStartupContext; import javax.swing.Icon; @@ -41,7 +42,8 @@ public class UILockButton extends UIButton implements EditLockChangeListener { } private void init() { - boolean locked = EditLockUtils.isLocked(LockItem.CONNECTION); + // 设计器如果还在启动中就不需要判断上锁情况,界面都还没出现呢,直接短路掉 + boolean locked = !DesignerStartupContext.getInstance().isOnStartup() && EditLockUtils.isLocked(LockItem.CONNECTION); this.setIcon(locked ? lockedIcon : normalIcon); this.setToolTipText(locked ? lockedTooltips : normalTooltips); }