Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/voxkit/gui/pages/pipeline/viewer_stacker.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def __init__(self, parent: QWidget | None = None) -> None:
self.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed)
self.setFixedHeight(self.RULER_HEIGHT)

_TIER_ORDER = {"phones": 0, "words": 1}
_TIER_ORDER = {"words": 0, "phones": 1}

def set_data(self, tiers: list[dict], duration: float) -> None:
self._tiers = sorted(
Expand Down Expand Up @@ -1839,7 +1839,11 @@ def _on_position_changed(self, position_ms: int):
def _update_active_segment_label(self, secs: float) -> None:
if self._active_label and self._active_label.isVisible() and self._loaded_tiers:
parts = []
for tier in self._loaded_tiers:
ordered_tiers = sorted(
self._loaded_tiers,
key=lambda t: TextGridTimeline._TIER_ORDER.get(t["name"].lower(), 2),
)
for tier in ordered_tiers:
if tier["class"] == "IntervalTier":
for iv in tier["intervals"]:
if iv["start"] <= secs < iv["end"] and iv["label"] not in _SILENCE_LABELS:
Expand Down
Loading