made the help dialog modeless, see #392

This commit is contained in:
hneemann 2019-12-10 22:02:06 +01:00
parent 7f9750ce24
commit b6a77596a6
2 changed files with 3 additions and 2 deletions

View File

@ -1151,8 +1151,9 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
@Override @Override
public void actionPerformed(ActionEvent actionEvent) { public void actionPerformed(ActionEvent actionEvent) {
try { try {
attributeDialog.dispose();
new ElementHelpDialog( new ElementHelpDialog(
attributeDialog, attributeDialog.getDialogParent(),
elementType, elementType,
element.getElementAttributes(), element.getElementAttributes(),
getCircuit().getAttributes().get(Keys.IS_GENERIC)).setVisible(true); getCircuit().getAttributes().get(Keys.IS_GENERIC)).setVisible(true);

View File

@ -66,7 +66,7 @@ public class ElementHelpDialog extends JDialog {
* @throws NodeException NodeException * @throws NodeException NodeException
*/ */
public ElementHelpDialog(Window parent, ElementTypeDescription elementType, ElementAttributes elementAttributes, boolean showKeys) throws NodeException, PinException { public ElementHelpDialog(Window parent, ElementTypeDescription elementType, ElementAttributes elementAttributes, boolean showKeys) throws NodeException, PinException {
super(parent, Lang.get("attr_help"), ModalityType.APPLICATION_MODAL); super(parent, Lang.get("attr_help"), ModalityType.MODELESS);
this.showKeys = showKeys; this.showKeys = showKeys;
setDefaultCloseOperation(DISPOSE_ON_CLOSE); setDefaultCloseOperation(DISPOSE_ON_CLOSE);
StringWriter w = new StringWriter(); StringWriter w = new StringWriter();