Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Draft: Fixed broken backwards compatibility with annotations
- Loading branch information
1 parent
1090da6
commit dc742e8
Showing
2 changed files
with
52 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dc742e8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carlopav Check what Yorik is adding. This was necessary to support older objects, because older objects don't already have the new property, so if you test for the new property it will not be found. So defining a default
self.ScaleMultiplier = 1.00
makes sense. You should double check your code with older files to make sure they work as intended. This is also very very critical with all objects that you are moving fromDraft.py
. The GuiCommands are relatively easy to move, because they are not saved into the FreeCAD file, but the Draft objects are, so we must be extra careful.dc742e8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, I saw the changes. at the time I added the code this was still not clear to me.
Another approach perhaps would have been to check onDocumentRestored if the new property exists and add it?