From 44adb7d572c819da04a3e418226d652e786f1f53 Mon Sep 17 00:00:00 2001 From: "Link.Zhao" Date: Mon, 29 Aug 2022 14:44:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=E9=97=AE=E9=A2=98=20=E6=89=8B?= =?UTF-8?q?=E5=8A=A8=E5=90=88release11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alphafine/component/AlphaFineFrame.java | 13 ++++++------- .../alphafine/preview/TemplateShopPane.java | 8 ++++++-- .../search/TemplateResourceSearchWorkerManager.java | 3 +-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java index bfd40aea32..339643efc9 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineFrame.java @@ -349,7 +349,7 @@ public class AlphaFineFrame extends JFrame { popupMenu.addPopupMenuListener(new PopupMenuListener() { @Override public void popupMenuWillBecomeVisible(PopupMenuEvent e) { - // do nothing + // do nothing } @Override @@ -584,7 +584,7 @@ public class AlphaFineFrame extends JFrame { switchType(CellType.PLUGIN); break; case TEMPLATE_SHOP: - TemplateShopPane.getInstance().showPagePane(); + TemplateShopPane.getInstance().showResult(); switchType(CellType.TEMPLATE_SHOP); break; } @@ -602,9 +602,8 @@ public class AlphaFineFrame extends JFrame { if (alphaFineConfigManager.isProductDynamics()) { selectedLabelList.add(new SelectedLabel(PRODUCT_NEWS, CellType.PRODUCT_NEWS)); } - // 默认选中模板商城 if (alphaFineConfigManager.hasTemplateShop()) { - selectedLabelList.add(new SelectedLabel(TEMPLATE_SHOP, CellType.TEMPLATE_SHOP, true)); + selectedLabelList.add(new SelectedLabel(TEMPLATE_SHOP, CellType.TEMPLATE_SHOP)); } if (alphaFineConfigManager.isContainDocument()) { selectedLabelList.add(new SelectedLabel(HELP, CellType.DOCUMENT)); @@ -620,8 +619,8 @@ public class AlphaFineFrame extends JFrame { } - // 如果不展示模板商城,则list中第一个被选中 - if (!alphaFineConfigManager.hasTemplateShop() && !selectedLabelList.isEmpty()) { + // 默认选中第一个tab + if (!selectedLabelList.isEmpty()) { selectedLabelList.get(0).setSelected(true); } @@ -1010,4 +1009,4 @@ public class AlphaFineFrame extends JFrame { QuestionWindow.getInstance().setVisible(true); } -} +} \ No newline at end of file diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/TemplateShopPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/TemplateShopPane.java index fb0181ddd3..00e7c4495c 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/TemplateShopPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/TemplateShopPane.java @@ -71,8 +71,12 @@ public class TemplateShopPane extends JPanel { } } - public void showPagePane() { - switchCard(PAGE_PANEL); + public void showResult() { + if (Strings.isEmpty(AlphaFineHelper.getAlphaFineDialog().getSearchText())) { + switchCard(DEFAULT_PAGE_PANEL); + } else { + switchCard(PAGE_PANEL); + } } // 打开二级页面,显示详细信息 diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/TemplateResourceSearchWorkerManager.java b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/TemplateResourceSearchWorkerManager.java index ac1ef39a78..613f0f57a8 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/TemplateResourceSearchWorkerManager.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/TemplateResourceSearchWorkerManager.java @@ -38,13 +38,12 @@ public class TemplateResourceSearchWorkerManager implements SearchManager { public void doSearch(SearchTextBean searchTextBean) { checkSearchWork(); searchOver = false; - networkError = false; this.searchWorker = new SwingWorker, Void>() { @Override protected List doInBackground() { List list; - if (!AlphaFineHelper.isNetworkOk() && cellType.isNeedNetWork()) { + if (!AlphaFineHelper.isNetworkOk()) { networkError = true; FineLoggerFactory.getLogger().warn("alphaFine network error"); }