MAINT: Clone more legend settings in Qt figure options#32014
Conversation
|
Thank you for opening your first PR into Matplotlib! If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks. We also ask that you please finish addressing any review comments on this PR and wait for it to be merged (or closed) before opening a new one, as it can be a valuable learning experience to go through the review process. You can also join us on discourse chat for real-time discussion. For details on testing, writing docs, and our review process, please see the developer guide. We strive to be a welcoming and open project. Please follow our Code of Conduct. |
|
It looks like you opened this PR twice, I'll leave #32015 open and close this one. In the future feel free to edit the existing PR rather than making a new one |
PR summary
Closes #17775
When regenerating the legend in the Qt figure options dialog, the code currently only preserves the
ncolsanddraggableproperties. Any other custom settings the user might have configured on the legend (like title, location, or frame styling) are completely discarded and reset to defaults when clicking "Apply".This PR fixes this by extracting additional useful properties (like
title,loc,frameon,shadow,edgecolor,facecolor, andframealpha) from the old legend and passing them to the new legend, ensuring that user configurations are preserved.AI Disclosure
I wrote and structured the PR myself, relying on the documentation and the internal attributes of the
Legendclass.PR checklist