Skip to content

Fix file name of exported parts#33351

Open
ajuncosa wants to merge 1 commit into
musescore:mainfrom
ajuncosa:fix-export-name
Open

Fix file name of exported parts#33351
ajuncosa wants to merge 1 commit into
musescore:mainfrom
ajuncosa:fix-export-name

Conversation

@ajuncosa
Copy link
Copy Markdown
Contributor

Resolves: #21161

When exporting score parts, the resulting filename was expected to have appended some description of the file's contents (e.g. the part name for individual part files, or -Parts/-Score_and_parts for multipart files).

However, this was only the case the first time an export was made, and later exports contained only the filename.

This was due to a default path being saved in the ExportDialogModel in order to "remember" the last export directory. This default path contained the full path, including the filename, of the first export made since opening the MSS program, and it caused subsequent exports to use the exact same default without appending the extra filename parts.

The fix is to store the path to the default save directory, instead of the full path to the last saved file. This way, only the directory is reused, while the filename is re-calculated each time an export is made.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7cb24bbe-0d46-4668-bf8e-991d1a8d4ee7

📥 Commits

Reviewing files that changed from the base of the PR and between 3c30b96 and a130bb7.

📒 Files selected for processing (6)
  • muse
  • src/project/internal/exportprojectscenario.cpp
  • src/project/internal/exportprojectscenario.h
  • src/project/qml/MuseScore/Project/internal/Export/exportdialogmodel.cpp
  • src/project/qml/MuseScore/Project/internal/Export/exportdialogmodel.h
  • src/project/types/projecttypes.h

📝 Walkthrough

Walkthrough

This PR refactors export path storage across the project. The ExportInfo struct's public member changes from exportPath to exportDirPath. The ExportProjectScenario::askExportPath method signature shifts from accepting a default full path to accepting a default directory path, with path construction logic moved into the method implementation. The ExportDialogModel updates its internal storage to track only the export directory, and all init, export, and persistence operations transition to this directory-based approach. A submodule dependency is also updated.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix file name of exported parts' directly and clearly describes the main change: correcting the filename issue when exporting score parts.
Description check ✅ Passed The description provides issue reference (#21161), clear explanation of the problem, root cause analysis, and the solution, matching the template requirements.
Linked Issues check ✅ Passed Code changes implement the fix for issue #21161 by storing directory path instead of full file path to allow filename recalculation on each export.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the export filename issue: parameter renaming, storage structure changes, and logic adjustments to distinguish directory from full paths.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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 and usage tips.

@igorkorsukov igorkorsukov changed the base branch from master to main May 12, 2026 07:50
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.

Exported part filename misses part name, if only single part is exported

3 participants