Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File export: generate a default filename if the selected object chang… #18907

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

BootsSiR
Copy link

@BootsSiR BootsSiR commented Jan 6, 2025

My first contribution to FreeCAD so bear with me. Often while modelling I'll make changes to parts and export with different file names. I noticed that if you export with a custom file name, subsequent export filenames are not what you would expect. See video example here:

freecad_export_orig.mp4

I made a very small adjustment to the export code so we now track if the selected object changes between exports and if so, we generate the default filename. I find this produces results which would be more expected by the user. See video after change here:

freecad_export_new.mp4

this fixes #18913

@github-actions github-actions bot added the Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD label Jan 6, 2025
Copy link
Contributor

@hyarion hyarion left a comment

Choose a reason for hiding this comment

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

Great PR!
I've tried to find a case where this wouldn't be what the user expects, but can't come up with such a case.

I think it would be even better with suggested variable name change but either case I think this should be merged.

src/Gui/CommandDoc.cpp Outdated Show resolved Hide resolved
@hyarion
Copy link
Contributor

hyarion commented Jan 8, 2025

@maxwxyz can you approve the CI to run?

@maxwxyz
Copy link
Collaborator

maxwxyz commented Jan 8, 2025

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exporting multiple parts from a project can cause the wrong default filenames to be generated
3 participants