Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f76cdb3

Browse files
committed
set settings window to non modal
1 parent f9bb47e commit f76cdb3

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

lib/matplotlib/backends/backend_qt5.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ def configure_subplots(self):
716716
image = str(cbook._get_data_path('images/matplotlib.png'))
717717
dia = SubplotToolQt(self.canvas.figure, self.canvas.parent())
718718
dia.setWindowIcon(QtGui.QIcon(image))
719-
dia.exec_()
719+
dia.show()
720720

721721
def save_figure(self, *args):
722722
filetypes = self.canvas.get_supported_filetypes_grouped()
@@ -820,7 +820,7 @@ def _export_values(self):
820820
QtGui.QFontMetrics(text.document().defaultFont())
821821
.size(0, text.toPlainText()).height() + 20)
822822
text.setMaximumSize(size)
823-
dialog.exec_()
823+
dialog.show()
824824

825825
def _on_value_changed(self):
826826
spinboxes = self._spinboxes

lib/matplotlib/backends/qt_editor/_formlayout.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ def update_buttons(self):
478478

479479
def accept(self):
480480
self.data = self.formwidget.get()
481+
self.apply_callback(self.data)
481482
super().accept()
482483

483484
def reject(self):
@@ -526,8 +527,7 @@ def fedit(data, title="", comment="", icon=None, parent=None, apply=None):
526527
if QtWidgets.QApplication.startingUp():
527528
_app = QtWidgets.QApplication([])
528529
dialog = FormDialog(data, title, comment, icon, parent, apply)
529-
if dialog.exec_():
530-
return dialog.get()
530+
dialog.show()
531531

532532

533533
if __name__ == "__main__":

lib/matplotlib/backends/qt_editor/figureoptions.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,8 @@ def apply_callback(data):
259259
if not (axes.get_xlim() == orig_xlim and axes.get_ylim() == orig_ylim):
260260
figure.canvas.toolbar.push_current()
261261

262-
data = _formlayout.fedit(
262+
_formlayout.fedit(
263263
datalist, title="Figure options", parent=parent,
264264
icon=QtGui.QIcon(
265265
str(cbook._get_data_path('images', 'qt4_editor_options.svg'))),
266266
apply=apply_callback)
267-
if data is not None:
268-
apply_callback(data)

0 commit comments

Comments
 (0)