-
-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor FormatPainter code and don't reference the original diagram …
…object - Don't reference the original diagram object in case the user closes its containing model. Instead make a snapshot copy of it. It might be that the original object is in a large model consuming a lot of memory. If the user closes that model it could not be garbage collected as we would hold a reference to it. - This has the side effect that we now make a snapshot of the object when the FormatPainter copies the object. Thereafter, any pasted attributes come from the snapshot, whereas before if the user changed an attribute of the original object that would be pasted. - When pasting the fill color and the source or target fill is null ("default"), compare on actual colors. This avoids the problem of copying a null fill color and pasting an actual fill color on an object with the same default fill color. - We're not going to sub-class FormatPainterToolEntry so remove that support. This was added in 2011 and, 13 years later, we haven't sub-classed it. :-) - Get rid of PaintFormat inner class - Modernise code
- Loading branch information
Showing
5 changed files
with
169 additions
and
167 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
Oops, something went wrong.