NewFile command: Don't change palette in grayscale images

This commit is contained in:
David Capello 2014-06-01 18:10:52 -03:00
parent 76afcfedac
commit f91f41a425

View File

@ -174,7 +174,8 @@ void NewFileCommand::onExecute(Context* context)
(format == IMAGE_INDEXED ? ncolors: 256)));
Sprite* sprite(document->getSprite());
get_default_palette()->copyColorsTo(sprite->getPalette(FrameNumber(0)));
if (sprite->getPixelFormat() != IMAGE_GRAYSCALE)
get_default_palette()->copyColorsTo(sprite->getPalette(FrameNumber(0)));
usprintf(buf, "Sprite-%04d", ++_sprite_counter);
document->setFilename(buf);