Skip to content

Commit 2f6928f

Browse files
authored
Merge pull request matplotlib#17264 from anntzer/gtksave
Don't trigger save when gtk save dialog is closed by escape.
2 parents 9a9c8b8 + bc5add6 commit 2f6928f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_gtk3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ def on_notify_filter(*args):
570570
ff = dialog.get_filter() # Doesn't autoadjust to filename :/
571571
fmt = self.canvas.get_supported_filetypes_grouped()[ff.get_name()][0]
572572
dialog.destroy()
573-
if response == Gtk.ResponseType.CANCEL:
573+
if response != Gtk.ResponseType.OK:
574574
return
575575
# Save dir for next time, unless empty str (which means use cwd).
576576
if mpl.rcParams['savefig.directory']:

0 commit comments

Comments
 (0)