Skip to content

Commit 2690fdf

Browse files
committed
Fix regression causing empty label in X/Y cross section plots
1 parent ded457d commit 2690fdf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ In this release, test coverage is 79%.
1212
* This is now fixed by introducing new constants for axis IDs in the
1313
`plotpy.constants` module, and using them everywhere in the code, thus avoiding
1414
to import the `plotpy.plot` module just to get the axis IDs
15+
* Fix empty label in X/Y cross section plots:
16+
* This is a regression introduced in V2.1.0
17+
* When showing the X/Y cross section plots (using the plot context menu), an empty
18+
label was displayed at the center of each of those plots
19+
* The label now shows "Enable a marker" as previously
1520

1621
💥 New features / Enhancements:
1722

plotpy/panels/csection/csplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ def lut_changed(self, plot: BasePlot) -> None:
364364

365365

366366
class HorizontalCrossSectionPlot(BaseCrossSectionPlot):
367+
LABEL_TEXT = _("Enable a marker")
367368
CS_AXIS = X_BOTTOM
368369
Z_AXIS = Y_LEFT
369370

@@ -391,6 +392,7 @@ def axis_dir_changed(self, plot: BasePlot, axis_id: str) -> None:
391392

392393

393394
class VerticalCrossSectionPlot(BaseCrossSectionPlot):
395+
LABEL_TEXT = _("Enable a marker")
394396
CS_AXIS = Y_LEFT
395397
Z_AXIS = X_BOTTOM
396398
Z_MAX_MAJOR = 3
@@ -419,8 +421,6 @@ def axis_dir_changed(self, plot: BasePlot, axis_id: str) -> None:
419421

420422

421423
class XYCrossSectionMixin:
422-
LABEL_TEXT = _("Enable a marker")
423-
424424
def connect_plot(self, plot: BasePlot) -> None:
425425
"""Connect plot to cross section plot
426426

0 commit comments

Comments
 (0)