diff --git a/src/main/java/com/liuzhihang/doc/view/ui/SettingsForm.java b/src/main/java/com/liuzhihang/doc/view/ui/SettingsForm.java index f49c652..c173b67 100644 --- a/src/main/java/com/liuzhihang/doc/view/ui/SettingsForm.java +++ b/src/main/java/com/liuzhihang/doc/view/ui/SettingsForm.java @@ -80,7 +80,7 @@ public SettingsForm(@NotNull Project project) { supportLinkLabel.setBorder(JBUI.Borders.emptyTop(20)); supportLinkLabel.setIcon(AllIcons.Actions.Find); - supportLinkLabel.setListener((source, data) -> new SupportForm().show(), null); + supportLinkLabel.setListener((source, data) -> new SupportForm(project).show(), null); initTitleBorder(); } diff --git a/src/main/java/com/liuzhihang/doc/view/ui/SupportForm.java b/src/main/java/com/liuzhihang/doc/view/ui/SupportForm.java index 27f9801..cfafcef 100644 --- a/src/main/java/com/liuzhihang/doc/view/ui/SupportForm.java +++ b/src/main/java/com/liuzhihang/doc/view/ui/SupportForm.java @@ -1,10 +1,12 @@ package com.liuzhihang.doc.view.ui; import com.intellij.ide.BrowserUtil; +import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.ui.components.labels.LinkLabel; import com.intellij.util.ui.JBUI; import com.liuzhihang.doc.view.DocViewBundle; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; @@ -21,8 +23,8 @@ public class SupportForm extends DialogWrapper { private LinkLabel discussionsLinkLabel; private LinkLabel websiteLinkLabel; - public SupportForm() { - super(null, true, DialogWrapper.IdeModalityType.PROJECT); + public SupportForm(@NotNull Project project) { + super(project, true); init(); diff --git a/src/main/java/com/liuzhihang/doc/view/ui/TemplateSettingForm.java b/src/main/java/com/liuzhihang/doc/view/ui/TemplateSettingForm.java index ce8ed1b..3b59ef3 100644 --- a/src/main/java/com/liuzhihang/doc/view/ui/TemplateSettingForm.java +++ b/src/main/java/com/liuzhihang/doc/view/ui/TemplateSettingForm.java @@ -40,7 +40,7 @@ public class TemplateSettingForm extends DialogWrapper { private final Project project; public TemplateSettingForm(Project project) { - super(project, true, DialogWrapper.IdeModalityType.PROJECT); + super(project, true); this.project = project; init();