-
-
Notifications
You must be signed in to change notification settings - Fork 93
Open
Labels
bugSomething isn't working correctlySomething isn't working correctlyconfirmedThis bug has been confirmedThis bug has been confirmed
Milestone
Description
Describe the bug
I added this exception in SetRobust, because otherwise the ploteditor changes the underlying color scheme images, making the entire GUI go bonkers.
// images should not be copied per content: just set the pointer!
// otherwise the original images (esp colors!) are altered.
if img, ok := to.(*image.Image); ok {
if fimg, ok := from.(image.Image); ok {
*img = fimg
return nil
}
}In general there is an ambiguity in copying pointers whether it is "deep" or "shallow". We need to figure out a better general-purpose solution to this issue.
This issue also arises in this case because we made the colors.Scheme colors images instead of underlying color.RGBA -- the images are what we use everywhere because it is the most general representation of color, and it saves having to convert the RGBA to an image in 100's of cases across the codebase.
How to reproduce
comment out the above.,
Example code
No response
Relevant output
No response
Platform
macOS
Metadata
Metadata
Assignees
Labels
bugSomething isn't working correctlySomething isn't working correctlyconfirmedThis bug has been confirmedThis bug has been confirmed
Type
Projects
Status
Todo