@@ -227,14 +227,6 @@ def get_stop_color(self, index: int) -> QG.QColor:
227227 index = min (index , len (self .stops ))
228228 return QG .QColor (self .stops [index ].rgb )
229229
230- def stop_values (self ) -> list [float ]:
231- """Returns the color stops values as a list of floats.
232-
233- Returns:
234- List of color stops values.
235- """
236- return [stop .pos for stop in self .stops ]
237-
238230
239231class ColorMapWidget (QW .QWidget ):
240232 """Simple colormap widget containing a horizontal slider and a colorbar image.
@@ -301,7 +293,7 @@ def __init__(
301293 self ._colormap = EditableColormap (color1 , color2 )
302294 else :
303295 self ._colormap = colormap
304- self .set_handles_values (colormap .stop_values ())
296+ self .set_handles_values (colormap .colorStops ())
305297
306298 self .colortable = self ._colormap .colorTable (self .qwt_color_interval )
307299
@@ -332,7 +324,7 @@ def set_colormap(self, colormap: EditableColormap) -> None:
332324 Args:
333325 colormap: replacement colormap
334326 """
335- new_values = colormap .stop_values ()
327+ new_values = colormap .colorStops ()
336328 self ._colormap = colormap
337329 self .set_handles_values (new_values )
338330 self .COLORMAP_CHANGED .emit ()
@@ -434,7 +426,7 @@ def edit_color_stop(
434426 new_color = QG .QColor (self .colortable [new_color ])
435427
436428 self ._colormap .move_color_stop (index , new_pos , new_color )
437- self .set_handles_values (self ._colormap .stop_values ())
429+ self .set_handles_values (self ._colormap .colorStops ())
438430 self .COLORMAP_CHANGED .emit ()
439431
440432 def _edit_color_map_on_slider_change (self , raw_values : tuple [float , ...]) -> None :
0 commit comments