From 5132d43d76d4912e9ade46a730359dbef59542e4 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 4 Jan 2022 15:56:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-65381=20linux=5Farm=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8-=E7=82=B9=E5=87=BB=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=A0=8F=E6=96=87=E4=BB=B6-=E9=80=89=E9=A1=B9=EF=BC=8C?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E5=BC=B9=E7=AA=97=E5=90=8E=E5=86=8D=E7=82=B9?= =?UTF-8?q?=E5=87=BB=20=E7=A1=AE=E5=AE=9A=E6=8C=89=E9=92=AE=EF=BC=8C?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E4=B8=8D=E6=B6=88=E5=A4=B1=EF=BC=8C=E6=97=A0?= =?UTF-8?q?=E4=BB=BB=E4=BD=95=E5=8F=8D=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/actions/file/PreferencePane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java index e3dd02e95..db94ace66 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java @@ -788,7 +788,7 @@ public class PreferencePane extends BasicPane { designerEnvManager.setJoinProductImprove(this.joinProductImproveCheckBox.isSelected()); designerEnvManager.setEmbedServerLazyStartup(this.embedServerLazyStartupCheckBox.isSelected()); designerEnvManager.setImageCompress(this.imageCompressPanelCheckBox.isSelected()); - designerEnvManager.setUseOptimizedUPM4Adapter(this.useOptimizedUPMCheckbox.isSelected()); + designerEnvManager.setUseOptimizedUPM4Adapter(this.useOptimizedUPMCheckbox != null && this.useOptimizedUPMCheckbox.isSelected()); VcsConfigManager vcsConfigManager = designerEnvManager.getVcsConfigManager(); vcsConfigManager.setSaveInterval(this.saveIntervalEditor.getValue()); vcsConfigManager.setVcsEnable(this.vcsEnableCheckBox.isSelected()); From d1321ea0815c4b4a4c4b672b38ac363728852cf6 Mon Sep 17 00:00:00 2001 From: hades Date: Tue, 4 Jan 2022 15:56:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-65369=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E5=86=85=E5=AF=B9macOS12=E7=9A=84=E5=A4=84=E7=90=86-=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=9B=BE=E6=A0=87=E8=AE=BE=E7=BD=AE-=E5=9C=A8?= =?UTF-8?q?=E7=82=B9=E5=87=BB=20=E9=80=89=E6=8B=A9=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E6=97=B6=E5=9B=9E=E5=88=B0=E4=BA=86=E7=88=B6=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=AE=9E=E6=97=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=87=BA=E6=9D=A5=EF=BC=8C=E8=80=8C=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E5=86=8D=E6=AC=A1=E5=8D=95=E6=9C=BA=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/web/CustomIconPane.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java b/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java index 96b584020..564b09d46 100644 --- a/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java +++ b/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java @@ -40,6 +40,7 @@ import java.awt.FlowLayout; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; +import java.awt.Window; import javax.swing.ButtonGroup; import javax.swing.ImageIcon; import javax.swing.JComponent; @@ -425,7 +426,7 @@ public class CustomIconPane extends BasicPane { browseButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - onBrowseButtonClicked(); + onBrowseButtonClicked(SwingUtilities.getWindowAncestor(EditIconDialog.this)); } }); @@ -460,11 +461,11 @@ public class CustomIconPane extends BasicPane { this.add(centerPane, BorderLayout.CENTER); } - private void onBrowseButtonClicked() { + private void onBrowseButtonClicked(Window parent) { // carl:不知道是否只要png格式,反正导出时全部都转成png了 FileChooserProvider fileChooserProvider = FileChooserFactory.createFileChooser(FileChooserArgs.newBuilder(). setFilter("Icon Image File", "*.jpg", "*.jpeg", "*.png", "*.gif").build()); - if (JFileChooser.APPROVE_OPTION == fileChooserProvider.showDialog(DesignerContext.getDesignerFrame())) { + if (JFileChooser.APPROVE_OPTION == fileChooserProvider.showDialog(parent)) { String path = fileChooserProvider.getSelectedFile().getAbsolutePath(); // 图片存储有最大值48*48限制,没有超过最大值时,按原图大小存储,超过最大值后,压缩至最大值存储 Image image = BaseUtils.readImage(path);