Skip to content

Commit b09b9a7

Browse files
committed
Fix update_status method in cross-section tools to retrieve all image items
Fix #47 (cherry picked from commit ca233f8) # Conflicts: # CHANGELOG.md
1 parent 29f7953 commit b09b9a7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog #
22

3-
## Version 2.8.0 ##
3+
## Version 2.7.5 ##
44

55
💥 New features / Enhancements:
66

@@ -12,6 +12,10 @@
1212
🛠️ Bug fixes:
1313

1414
* [Issue #44](https://github.com/PlotPyStack/PlotPy/issues/44) - Incorrect calculation method for "∑(y)" in `CurveStatsTool`: replaced `spt.trapezoid` with `np.sum`, which is more consistent with the summation operation
15+
* Fix `update_status` method in all cross-section tools (intensity profile tools):
16+
* Use `get_items` instead of `get_selected_items` to retrieve the image items
17+
* This allows the tools to work properly when no image item is selected, but there are image items in the plot
18+
* This closes [Issue #47](https://github.com/PlotPyStack/PlotPy/issues/47) - Intensity profile tools do not work when no image item is selected
1519
* [Issue #46](https://github.com/PlotPyStack/PlotPy/issues/46) - Contrast adjustment with 'Eliminate outliers' failed for float images with high dynamic range
1620

1721
Other changes:

plotpy/tools/cross_section.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class CrossSectionTool(RectangularShapeTool):
3333
def update_status(self, plot: BasePlot) -> None:
3434
"""Update status of the tool"""
3535
if update_image_tool_status(self, plot):
36-
item = plot.get_selected_items(item_type=IImageItemType)
36+
item = plot.get_items(item_type=IImageItemType)
3737
self.action.setEnabled(len(item) > 0)
3838

3939
def create_shape(self) -> AnnotatedPoint:

0 commit comments

Comments
 (0)