-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
[Bug] Name Remains after Deleting Pattern from Slot #48
Comments
The issue can be resolved by editing the following method: ACNHDesignPatternEditor/Assets/Plugins/DesignPatternExtension.cs Lines 278 to 296 in 498aa02
I've confirmed this to work, but I'm not a Unity developer and don't think I have my development environment set up correctly. I'm getting weird behavior even before making edits. I've pushed the changes to my fork: JeffreyBytes@f887f32 Here's a code comparison between the old and new code: public static void Empty(this DesignPattern pattern)
{
for (var i = 0; i < pattern.Palette.Length; i++)
{
pattern.Palette[i].R = EmptyPalette[i].Item1;
pattern.Palette[i].G = EmptyPalette[i].Item2;
pattern.Palette[i].B = EmptyPalette[i].Item3;
}
pattern.Image = new byte[(pattern.Width / 2) * pattern.Height];
if (pattern is ProDesignPattern)
{
pattern.Type = DesignPattern.TypeEnum.EmptyProPattern;
+ pattern.Name = "PRO Pattern";
Array.Copy(EmptyProPixels, 0, pattern.Image, 0, EmptyProPixels.Length);
}
else
{
+ pattern.Name = "Design Pattern";
Array.Copy(EmptyPixels, 0, pattern.Image, 0, pattern.Image.Length);
}
} |
Description:
When deleting a pattern from grid, the name of the last pattern stays in that slot.
Environment:
OS: Windows
Version: 0.9.5p16 (latest)
Steps to Reproduce:
Expected Behavior:
Name is set to "Empty" or "Design Pattern"
Actual Behavior:
Last pattern name remains
Screenshot:
Reproducibility:
Issue occurs consistently.
Related Issue:
Might be related to #41
Note:
When importing a pattern, the name is filled in successfully. This is only an issue when deleting patterns.
This isn't an application-breaking bug, but more of a QoL thing.
The text was updated successfully, but these errors were encountered: