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

obsoleteing doesn't correctly update the label field #4007

Open
vanepp opened this issue Feb 28, 2023 · 1 comment
Open

obsoleteing doesn't correctly update the label field #4007

vanepp opened this issue Feb 28, 2023 · 1 comment

Comments

@vanepp
Copy link
Contributor

vanepp commented Feb 28, 2023

Current Behaviour

Load a sketch with an obsoleted part (Dual_VNH2SP30_Motor_Driver in this case)

capture

say yes to the update

capture1

Load the updated part from core parts. Its label is A1 (which is what is set in the part) but the label on the updated part is still the old label MD03A1.

capture2

This appears to be because of the title field in the .fz file for the upgraded obsoleted part it remains MD03A1

instance moduleIdRef="DualVNH249121052c4ad42279a5b27945f1a08b2" modelIndex="6486" path="C:/Program Files/Fritzing/fritzing-parts/core/Dual_VNH2SP30_Motor_Driver_7756e52_2.fzp"
property name="part number" value="MD03A"/
title>MD03A1</title

for the part loaded from core parts (and then saved as f .fzz file) the title is the expected A1 from the part.

edit try quoting the xml as it got eaten by the post and I don't know how to escape it on github ...
quoting didn't work so remove the greater than anad less thans.

instance moduleIdRef="DualVNH249121052c4ad42279a5b27945f1a08b2" modelIndex="5848" path="C:/Program Files/Fritzing/fritzing-parts/core/Dual_VNH2SP30_Motor_Driver_7756e52_2.fzp"
property name="part number" value="MD03A"/
title>A1</title

To me it appears the obsolete mechanism isn't updating something during the update which leaves the title field with the old value.

Build:

Version 0.9.10
(bCD-2134-0-40d23c29 2022-07-01) 64 [Qt 5.15.2]

Operating System:
Windows 10

Steps to reproduce:

See Current Behaviour above

Expected Behaviour

The label field for the part gets updated to A1 after the obsolete completes.

@KjellMorgenstern
Copy link
Member

The title is a field of the sketch. For example, you might have changed it to "Left motor driver" and "Right motor driver".

It could be unexpected if these are changed to A1 and A2 after the update.

In theory we could add some code that asks the user about what to do with the title.

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

No branches or pull requests

2 participants