Skip to content

Commit 68d8627

Browse files
author
Quentin Peter
committed
only allow a single fedit
1 parent c9f5c3b commit 68d8627

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/backends/qt_editor/_formlayout.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,12 @@ def fedit(data, title="", comment="", icon=None, parent=None, apply=None):
527527
if QtWidgets.QApplication.startingUp():
528528
_app = QtWidgets.QApplication([])
529529
dialog = FormDialog(data, title, comment, icon, parent, apply)
530+
531+
if parent is not None:
532+
if hasattr(parent, "_fedit_dialog"):
533+
parent._fedit_dialog.close()
534+
parent._fedit_dialog = dialog
535+
530536
dialog.show()
531537

532538

0 commit comments

Comments
 (0)