Skip to content

Commit

Permalink
Merge pull request #84 from liuzhihang/develop
Browse files Browse the repository at this point in the history
修复模板设置窗口的模态类型
  • Loading branch information
liuzhihang authored Aug 20, 2024
2 parents 59e2861 + 863e162 commit fd052f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/liuzhihang/doc/view/ui/SettingsForm.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/liuzhihang/doc/view/ui/SupportForm.java
Original file line number Diff line number Diff line change
@@ -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.*;
Expand All @@ -21,8 +23,8 @@ public class SupportForm extends DialogWrapper {
private LinkLabel<String> discussionsLinkLabel;
private LinkLabel<String> websiteLinkLabel;

public SupportForm() {
super(null, true, DialogWrapper.IdeModalityType.PROJECT);
public SupportForm(@NotNull Project project) {
super(project, true);

init();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit fd052f5

Please sign in to comment.