Skip to content

Commit 4bdf2c6

Browse files
committed
Add missing set_style method to XRangeSelection class
1 parent b55f138 commit 4bdf2c6

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ In this release, test coverage is 79%.
2828
* `plotpy.widgets.selectdialog.SelectDialog`
2929
* `plotpy.widgets.selectdialog.select_with_shape_tool`
3030

31+
* Added missing `set_style` method to `XRangeSelection` class: this method is used
32+
to set the style of the range selection item from configuration options
33+
3134
🛠️ Bug fixes:
3235

3336
* Fix cyclic import in `plotpy.tools` module:

plotpy/items/shape/range.py

+10
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ def __init__(
5959
self.shapeparam.update_item(self) # creates all the above QObjects
6060
self.setIcon(get_icon("xrange.png"))
6161

62+
def set_style(self, section: str, option: str) -> None:
63+
"""Set style for this item
64+
65+
Args:
66+
section: Section
67+
option: Option
68+
"""
69+
self.shapeparam.read_config(CONF, section, option)
70+
self.shapeparam.update_item(self)
71+
6272
def __reduce__(self) -> tuple[type, tuple, tuple]:
6373
"""Return state information for pickling"""
6474
self.shapeparam.update_param(self)

0 commit comments

Comments
 (0)