Skip to content

fixed #10441: Split tool should work when in Spectrogram view - #11285

Merged
Eism merged 2 commits into
audacity:masterfrom
Eism:spectrogram_split_fix
Jun 30, 2026
Merged

Eism merged 2 commits into
audacity:masterfrom
Eism:spectrogram_split_fix

Conversation

@Eism

@Eism Eism commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Resolves: #10441

Two fixes:

  • disable spectrogram edit if split is enabled
  • cancel spectrogram edit if split is enabled

@Eism
Eism requested a review from saintmatthieu June 29, 2026 07:04
@coderabbitai

coderabbitai Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 413d0a4a-33c5-4cf7-80f9-44cd6393a88e

📥 Commits

Reviewing files that changed from the base of the PR and between c66aabb298190df0eaeea226ffe251e9bd9a8606 and 9875580.

📒 Files selected for processing (4)
  • src/projectscene/qml/Audacity/ProjectScene/tracksitemsview/TracksItemsView.qml
  • src/projectscene/view/tracksitemsview/selectionviewcontroller.cpp
  • src/projectscene/view/tracksitemsview/selectionviewcontroller.h
  • src/spectrogram/qml/Audacity/Spectrogram/ChannelSpectralSelectionContainer.qml
🚧 Files skipped from review as they are similar to previous changes (4)
  • src/projectscene/view/tracksitemsview/selectionviewcontroller.h
  • src/projectscene/qml/Audacity/ProjectScene/tracksitemsview/TracksItemsView.qml
  • src/spectrogram/qml/Audacity/Spectrogram/ChannelSpectralSelectionContainer.qml
  • src/projectscene/view/tracksitemsview/selectionviewcontroller.cpp

📝 Walkthrough

Walkthrough

The changes disable spectrogram interaction when the split tool is active. A splitToolActive boolean property is added to TracksItemsView, propagated through TrackClipsContainer and ClipItem, and used to disable ClipSpectrogramView and TrackSpectralSelectionContainer. When the split tool activates, TracksItemsView calls a new Q_INVOKABLE method SelectionViewController::cancelSpectrogramEdit(), which resets frequency selection state and clears in-progress vertical edit flags. Spectrogram MouseArea components across ClipSpectrogramView, ChannelSpectralSelectionContainer, and TrackSpectralSelectionContainer also gain explicit enabled: root.visible && root.enabled bindings, and ChannelSpectralSelectionContainer ends any active center-frequency drag when disabled.

Sequence Diagram(s)

sequenceDiagram
  participant SplitToolController
  participant TracksItemsView
  participant SelectionViewController
  participant TrackClipsContainer
  participant ClipItem
  participant ClipSpectrogramView
  participant TrackSpectralSelectionContainer

  SplitToolController->>TracksItemsView: active becomes true
  TracksItemsView->>SelectionViewController: cancelSpectrogramEdit()
  TracksItemsView->>TrackClipsContainer: splitToolActive=true
  TrackClipsContainer->>ClipItem: splitToolActive=true
  ClipItem->>ClipSpectrogramView: enabled=false
  TrackClipsContainer->>TrackSpectralSelectionContainer: enabled=false
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and directly matches the main change: fixing Split tool behavior in Spectrogram view.
Description check ✅ Passed It includes the issue reference and a clear summary of the two fixes, though the checklist/template items are not filled out.
Linked Issues check ✅ Passed The changes align with #10441 by preventing spectrogram edits from intercepting Split tool clicks and canceling active edits.
Out of Scope Changes check ✅ Passed All touched files support Split tool behavior in spectrogram and selection handling; no clearly unrelated changes are present.

Warning

Review ran into problems

🔥 Problems

Linked repositories: Your configuration references 1 linked repositories, but your current plan allows 0. Analyzed ``, skipped musescore/musescore.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: c25209af-3b8e-45ad-b742-2cc258d7985c

📥 Commits

Reviewing files that changed from the base of the PR and between a788aab and c66aabb298190df0eaeea226ffe251e9bd9a8606.

📒 Files selected for processing (8)
  • src/projectscene/qml/Audacity/ProjectScene/tracksitemsview/ClipItem.qml
  • src/projectscene/qml/Audacity/ProjectScene/tracksitemsview/TrackClipsContainer.qml
  • src/projectscene/qml/Audacity/ProjectScene/tracksitemsview/TracksItemsView.qml
  • src/projectscene/view/tracksitemsview/selectionviewcontroller.cpp
  • src/projectscene/view/tracksitemsview/selectionviewcontroller.h
  • src/spectrogram/qml/Audacity/Spectrogram/ChannelSpectralSelectionContainer.qml
  • src/spectrogram/qml/Audacity/Spectrogram/ClipSpectrogramView.qml
  • src/spectrogram/qml/Audacity/Spectrogram/TrackSpectralSelectionContainer.qml

@Eism
Eism force-pushed the spectrogram_split_fix branch from c66aabb to 9875580 Compare June 29, 2026 07:16
@Eism
Eism merged commit aff1a8f into audacity:master Jun 30, 2026
17 checks passed
@Eism
Eism deleted the spectrogram_split_fix branch June 30, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split tool should work when in Spectrogram view

2 participants