Skip to content

Commit 652326f

Browse files
committed
Fix ColorStops.stops method to return the list itself instead of a copy
1 parent 201c714 commit 652326f

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CHANGELOG.md

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

3+
## Version 0.12.1
4+
5+
- Fixed `ColorStops.stops` method (was returning a copy of the list of stops instead
6+
of the list itself)
7+
38
## Version 0.12.0
49

510
- 30% performance improvement (measured by `qwt.tests.test_loadtest`) by optimizing

qwt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
.. _GitHub: https://github.com/PlotPyStack/PythonQwt
2828
"""
2929

30-
__version__ = "0.12.0"
30+
__version__ = "0.12.1"
3131
QWT_VERSION_STR = "6.1.5"
3232

3333
import warnings

qwt/color_map.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,7 @@ def insert(self, pos, color):
9191
self.__stops[index].updateSteps(self.__stops[index + 1])
9292

9393
def stops(self):
94-
if self.__stops:
95-
return [stop for stop in self.__stops]
96-
else:
97-
return []
94+
return self.__stops
9895

9996
def findUpper(self, pos):
10097
index = 0

0 commit comments

Comments
 (0)