Skip to content

Commit 201c714

Browse files
committed
Update QwtLinearColorMap.colorStops API to return list of ColorStop objects
1 parent 3cc5755 commit 201c714

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
- Added an additional margin to the left of ticks labels: this margin is set to one
1414
character width, to avoid the labels to be truncated while keeping a tight layout
1515
- Slighly improved the new flat style (see V0.7.0) by selecting default fonts
16+
- API breaking change: `QwtLinearColorMap.colorStops` now returns a list of `ColorStop`
17+
objects instead of the list of stop values
1618

1719
## Version 0.11.2
1820

qwt/color_map.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
:members:
2929
"""
3030

31-
from qtpy.QtGui import QColor, qRed, qGreen, qBlue, qRgb, qRgba, qAlpha
3231
from qtpy.QtCore import Qt, qIsNaN
32+
from qtpy.QtGui import QColor, qAlpha, qBlue, qGreen, qRed, qRgb, qRgba
3333

3434

3535
class ColorStop(object):
@@ -92,7 +92,7 @@ def insert(self, pos, color):
9292

9393
def stops(self):
9494
if self.__stops:
95-
return [stop.pos for stop in self.__stops]
95+
return [stop for stop in self.__stops]
9696
else:
9797
return []
9898

0 commit comments

Comments
 (0)