mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-27 03:16:58 +00:00
Enable Remap button only for Indexed images
This commit is contained in:
parent
5fc3b06e8e
commit
9b07e0f9bf
@ -404,13 +404,17 @@ void ColorBar::onPaletteViewRemapColors(const Remap& remap, const Palette* newPa
|
|||||||
|
|
||||||
void ColorBar::applyRemap(const doc::Remap& remap, const doc::Palette* newPalette, const std::string& actionText)
|
void ColorBar::applyRemap(const doc::Remap& remap, const doc::Palette* newPalette, const std::string& actionText)
|
||||||
{
|
{
|
||||||
if (!m_remap) {
|
doc::Site site = UIContext::instance()->activeSite();
|
||||||
m_remap.reset(new doc::Remap(remap));
|
if (site.sprite() &&
|
||||||
m_remapButton.setVisible(true);
|
site.sprite()->pixelFormat() == IMAGE_INDEXED) {
|
||||||
layout();
|
if (!m_remap) {
|
||||||
}
|
m_remap.reset(new doc::Remap(remap));
|
||||||
else {
|
m_remapButton.setVisible(true);
|
||||||
m_remap->merge(remap);
|
layout();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_remap->merge(remap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setPalette(newPalette, actionText);
|
setPalette(newPalette, actionText);
|
||||||
|
Loading…
Reference in New Issue
Block a user