From 652326fcea917ae376f43b48775582406f77a5f7 Mon Sep 17 00:00:00 2001 From: Pierre Raybaut Date: Thu, 29 Feb 2024 17:43:20 +0100 Subject: [PATCH] Fix ColorStops.stops method to return the list itself instead of a copy --- CHANGELOG.md | 5 +++++ qwt/__init__.py | 2 +- qwt/color_map.py | 5 +---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60c0b01..b93bc12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/qwt/__init__.py b/qwt/__init__.py index 3772c76..07289d9 100644 --- a/qwt/__init__.py +++ b/qwt/__init__.py @@ -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 diff --git a/qwt/color_map.py b/qwt/color_map.py index 0b652e5..6debc8a 100644 --- a/qwt/color_map.py +++ b/qwt/color_map.py @@ -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