Skip to content

Commit dbb3d57

Browse files
author
Juan Segura
committed
Sprite editor: bug exporting attributes
1 parent b6d1275 commit dbb3d57

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

ZXBStudio/DocumentEditors/ZXGraphics/SpriteEditor.axaml.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,16 @@ private void _Initialize(string fileName)
293293
}
294294
}
295295
*/
296+
// Check attributes for ZX Spectrum mode
297+
if (sprite != null && sprite.Patterns != null)
298+
{
299+
var al = (sprite.Width / 8) * (sprite.Height / 8);
300+
foreach (var pattern in sprite.Patterns)
301+
{
302+
pattern.Attributes = pattern.Attributes.Take(al).ToArray();
303+
}
304+
}
305+
296306
// Create pattern list
297307
var spc = new SpritePatternControl();
298308
spc.Initialize(sprite, SpriteList_Command);

0 commit comments

Comments
 (0)