Skip to content

Commit

Permalink
Fix ColorStops.stops method to return the list itself instead of a copy
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreRaybaut committed Feb 29, 2024
1 parent 201c714 commit 652326f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# PythonQwt Releases

## Version 0.12.1

- Fixed `ColorStops.stops` method (was returning a copy of the list of stops instead
of the list itself)

## Version 0.12.0

- 30% performance improvement (measured by `qwt.tests.test_loadtest`) by optimizing
Expand Down
2 changes: 1 addition & 1 deletion qwt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
.. _GitHub: https://github.com/PlotPyStack/PythonQwt
"""

__version__ = "0.12.0"
__version__ = "0.12.1"
QWT_VERSION_STR = "6.1.5"

import warnings
Expand Down
5 changes: 1 addition & 4 deletions qwt/color_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ def insert(self, pos, color):
self.__stops[index].updateSteps(self.__stops[index + 1])

def stops(self):
if self.__stops:
return [stop for stop in self.__stops]
else:
return []
return self.__stops

def findUpper(self, pos):
index = 0
Expand Down

0 comments on commit 652326f

Please sign in to comment.