Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4649e21

Browse files
committed
Deprecate NavigationToolbar2QT.adj_window (unused and always None).
All's in the changelog.
1 parent 9faf231 commit 4649e21

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Deprecations
2+
````````````
3+
4+
The (unused and always None) ``NavigationToolbar2QT.adj_window`` attribute is
5+
deprecated.

lib/matplotlib/backends/backend_qt5.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -726,16 +726,18 @@ def _init_toolbar(self):
726726
labelAction = self.addWidget(self.locLabel)
727727
labelAction.setVisible(True)
728728

729-
# reference holder for subplots_adjust window
730-
self.adj_window = None
731-
732729
# Esthetic adjustments - we need to set these explicitly in PyQt5
733730
# otherwise the layout looks different - but we don't want to set it if
734731
# not using HiDPI icons otherwise they look worse than before.
735732
if is_pyqt5():
736733
self.setIconSize(QtCore.QSize(24, 24))
737734
self.layout().setSpacing(12)
738735

736+
@cbook.deprecated("3.1")
737+
@property
738+
def adj_window(self):
739+
return None
740+
739741
if is_pyqt5():
740742
# For some reason, self.setMinimumHeight doesn't seem to carry over to
741743
# the actual sizeHint, so override it instead in order to make the

0 commit comments

Comments
 (0)