Skip to content

Commit

Permalink
Sprite editor: bug exporting attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Segura committed Nov 17, 2024
1 parent 7782fb0 commit c00de3e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ZXBStudio/DocumentEditors/ZXGraphics/SpriteEditor.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,16 @@ private void _Initialize(string fileName)
}
}
*/
// Check attributes for ZX Spectrum mode
if (sprite != null && sprite.Patterns != null)
{
var al = (sprite.Width / 8) * (sprite.Height / 8);
foreach (var pattern in sprite.Patterns)
{
pattern.Attributes = pattern.Attributes.Take(al).ToArray();
}
}

// Create pattern list
var spc = new SpritePatternControl();
spc.Initialize(sprite, SpriteList_Command);
Expand Down

0 comments on commit c00de3e

Please sign in to comment.