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

Appearance settings

Commit a93b9fd

Browse filesBrowse files
dstansbymeeseeksmachine
authored andcommitted
Backport PR #18328: Add missing check for None in Qt toolmanager.
1 parent bd6f39b commit a93b9fd
Copy full SHA for a93b9fd

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎lib/matplotlib/backends/backend_qt5.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt5.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,8 @@ def add_toolitem(
916916
self, name, group, position, image_file, description, toggle):
917917

918918
button = QtWidgets.QToolButton(self)
919-
button.setIcon(NavigationToolbar2QT._icon(self, image_file))
919+
if image_file:
920+
button.setIcon(NavigationToolbar2QT._icon(self, image_file))
920921
button.setText(name)
921922
if description:
922923
button.setToolTip(description)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.