Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf533687

Browse files
authored
Merge pull request#27215 from bersbersbers/fix-27214
Add `@QtCore.Slot()` decorations to `NavigationToolbar2QT`
2 parents3180c94 +40c6756 commitf533687

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎lib/matplotlib/backends/backend_qt.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,8 +682,13 @@ def __init__(self, canvas, parent=None, coordinates=True):
682682
iftextisNone:
683683
self.addSeparator()
684684
else:
685+
slot=getattr(self,callback)
686+
# https://bugreports.qt.io/browse/PYSIDE-2512
687+
slot=functools.wraps(slot)(functools.partial(slot))
688+
slot=QtCore.Slot()(slot)
689+
685690
a=self.addAction(self._icon(image_file+'.png'),
686-
text,getattr(self,callback))
691+
text,slot)
687692
self._actions[callback]=a
688693
ifcallbackin ['zoom','pan']:
689694
a.setCheckable(True)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp