Hide dithering options when we convert to non-Indexed

This commit is contained in:
David Capello 2017-05-23 16:00:33 -03:00
parent 89acb421e0
commit adbcc75fad

View File

@ -254,8 +254,13 @@ private:
if (visibleBounds.isEmpty())
return;
doc::PixelFormat dstPixelFormat = item->pixelFormat();
if (m_ditheringSelector)
m_ditheringSelector->setVisible(dstPixelFormat == doc::IMAGE_INDEXED);
m_image.reset(
Image::create(item->pixelFormat(),
Image::create(dstPixelFormat,
visibleBounds.w,
visibleBounds.h,
m_imageBuffer));
@ -278,7 +283,7 @@ private:
m_image,
m_editor->sprite(),
m_editor->frame(),
item->pixelFormat(),
dstPixelFormat,
ditheringAlgorithm(),
ditheringMatrix(),
visibleBounds.origin()));