We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a5497f commit a77dc1bCopy full SHA for a77dc1b
qwt/text_engine.py
@@ -67,9 +67,9 @@ def __init__(self):
67
self._fm_cache = {}
68
69
def fontmetrics(self, font):
70
- fm = self._fm_cache.get(font)
+ fm = self._fm_cache.get(id(font))
71
if fm is None:
72
- return self._fm_cache.setdefault(font, QFontMetricsF(font))
+ return self._fm_cache.setdefault(id(font), QFontMetricsF(font))
73
else:
74
return fm
75
0 commit comments