Skip to content

Commit dea5b73

Browse files
committed
修复进行复制操作时点击取消按钮提示名称不能为空。
1 parent 93e18dc commit dea5b73

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/main/java/com/sjhy/plugin/ui/AbstractGroupPanel.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@ private void initEvent() {
196196
}
197197
// 输入分组名称
198198
String value = JOptionPane.showInputDialog(null, "Input Group Name:", currGroupName + " Copy");
199+
200+
// 取消复制,不需要提示信息
201+
if (value == null) {
202+
return;
203+
}
204+
199205
if (StringUtils.isEmpty(value)) {
200206
JOptionPane.showMessageDialog(null, "Group Name Can't Is Empty!");
201207
return;

src/main/java/com/sjhy/plugin/ui/AbstractTableGroupPanel.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@ private void initEvent() {
177177
return;
178178
}
179179
String value = JOptionPane.showInputDialog(null, "Input Group Name:", currGroupName + " Copy");
180+
181+
// 取消复制,不需要提示信息
182+
if (value == null) {
183+
return;
184+
}
185+
180186
if (StringUtils.isEmpty(value)) {
181187
JOptionPane.showMessageDialog(null, "Group Name Can't Is Empty!");
182188
return;

0 commit comments

Comments
 (0)