Skip to content

Commit

Permalink
Make backend checks case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
joshburnett committed Jun 13, 2024
1 parent e6377db commit b4a729f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/addcopyfighandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import matplotlib.backends
import matplotlib.pyplot as plt

__version__ = '3.2.0'
__version__ = '3.2.1'
__version_info__ = tuple(int(i) if i.isdigit() else i for i in __version__.split('.'))

oldfig = plt.figure
Expand Down Expand Up @@ -137,7 +137,7 @@ def copyfig(fig=None, format=None, *args, **kwargs):

print(f'Figure copied.')

elif 'Qt' in backend:
elif 'qt' in backend.lower():
# Use Qt version from matplotlib.
import importlib

Expand Down Expand Up @@ -191,7 +191,7 @@ def copyfig(fig=None, *args, **kwargs):

print(f'Figure copied.')

elif ostype == 'linux' and backend == 'GTK3Agg':
elif ostype == 'linux' and backend.lower() == 'gtk3agg':
# Only GTK 3 is supported, as GTK 4 has totally changed the way clipboard data is handled and I can't figure
# it out. I'm totally open to someone else solving this and submitting a PR if they want. I don't use GTK.
import subprocess
Expand Down

0 comments on commit b4a729f

Please sign in to comment.