Fix problem of "multiple entries" selected in ColorBar::onColorButtonChange() when the user picks the same color.

This commit is contained in:
David Capello 2012-03-21 14:41:37 -03:00
parent 6bd39e0aff
commit 1ed9b8782f

View File

@ -226,11 +226,6 @@ void ColorBar::onBgColorButtonChange(const Color& color)
void ColorBar::onColorButtonChange(const Color& color)
{
if (color.getType() == Color::IndexType) {
int index = color.getIndex();
// Change palette editor color only if it is not the selected entry
if (m_paletteView.getSelectedEntry() != index)
m_paletteView.selectColor(index);
}
if (color.getType() == Color::IndexType)
m_paletteView.selectColor(color.getIndex());
}