Skip to content

Commit 624d747

Browse files
committed
Remove unused QwtPlotItem.icon methods
1 parent 9553d0b commit 624d747

File tree

2 files changed

+7
-25
lines changed

2 files changed

+7
-25
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# PythonQwt Releases
22

3+
## Version 0.14.3
4+
5+
- Removed `QwtPlotItem.setIcon` and `QwtPlotItem.icon` methods (introduced in 0.9.0 but not used in PythonQwt)
6+
37
## Version 0.14.2
48

59
- Merged [PR #89](https://github.com/PlotPyStack/PythonQwt/pull/89): fixed call to `ScaleEngine.autoScale` in `QwtPlot.updateAxes` (returned values were not used) - thanks to @nicoddemus

qwt/plot.py

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,9 @@ def updateAxes(self):
954954
d.isValid = False
955955
minValue = intv_i.minValue()
956956
maxValue = intv_i.maxValue()
957-
minValue, maxValue, stepSize = d.scaleEngine.autoScale(d.maxMajor, minValue, maxValue, stepSize)
957+
minValue, maxValue, stepSize = d.scaleEngine.autoScale(
958+
d.maxMajor, minValue, maxValue, stepSize
959+
)
958960
if not d.isValid:
959961
d.scaleDiv = d.scaleEngine.divideScale(
960962
minValue, maxValue, d.maxMajor, d.maxMinor, stepSize
@@ -1706,7 +1708,6 @@ def __init__(self):
17061708
self.yAxis = QwtPlot.yLeft
17071709
self.legendIconSize = QSize(8, 8)
17081710
self.title = None # QwtText
1709-
self.icon = None
17101711

17111712

17121713
class QwtPlotItem(object):
@@ -1915,29 +1916,6 @@ def title(self):
19151916
"""
19161917
return self.__data.title
19171918

1918-
def setIcon(self, icon):
1919-
"""
1920-
Set item icon
1921-
1922-
:param icon: Icon
1923-
:type icon: QIcon
1924-
1925-
.. seealso::
1926-
1927-
:py:meth:`icon()`
1928-
"""
1929-
self.__data.icon = icon
1930-
1931-
def icon(self):
1932-
"""
1933-
:return: Icon of the item
1934-
1935-
.. seealso::
1936-
1937-
:py:meth:`setIcon()`
1938-
"""
1939-
return self.__data.icon
1940-
19411919
def setItemAttribute(self, attribute, on=True):
19421920
"""
19431921
Toggle an item attribute

0 commit comments

Comments
 (0)