Rename PaletteView::clearSelection() -> deselect()

This commit is contained in:
David Capello 2015-05-10 19:23:30 -03:00
parent b5b59dece4
commit 38526f3b9e
4 changed files with 10 additions and 10 deletions

View File

@ -159,7 +159,7 @@ ColorBar::ColorBar(int align)
setBgColor(get_config_color("ColorBar", "BG", getBgColor()));
// Clear the selection of the BG color in the palette.
m_paletteView.clearSelection();
m_paletteView.deselect();
// Set foreground color reading its value from the configuration.
setFgColor(get_config_color("ColorBar", "FG", getFgColor()));
@ -464,7 +464,7 @@ void ColorBar::onPaletteViewPasteColors(
void ColorBar::onFgColorButtonChange(const app::Color& color)
{
if (!m_lock)
m_paletteView.clearSelection();
m_paletteView.deselect();
FgColorChange(color);
onColorButtonChange(color);
@ -473,7 +473,7 @@ void ColorBar::onFgColorButtonChange(const app::Color& color)
void ColorBar::onBgColorButtonChange(const app::Color& color)
{
if (!m_lock)
m_paletteView.clearSelection();
m_paletteView.deselect();
BgColorChange(color);
onColorButtonChange(color);
@ -603,7 +603,7 @@ void ColorBar::destroyRemap()
void ColorBar::onNewInputPriority(InputChainElement* element)
{
m_paletteView.clearSelection();
m_paletteView.deselect();
}
bool ColorBar::onCanCut(Context* ctx)
@ -662,7 +662,7 @@ bool ColorBar::onClear(Context* ctx)
void ColorBar::onCancel(Context* ctx)
{
m_paletteView.clearSelection();
m_paletteView.deselect();
m_paletteView.discardClipboardSelection();
invalidate();
}

View File

@ -132,7 +132,7 @@ void ColorSelector::setColor(const app::Color& color, SetColorOptions options)
m_color = color;
if (color.getType() == app::Color::IndexType) {
m_colorPalette.clearSelection();
m_colorPalette.deselect();
m_colorPalette.selectColor(color.getIndex(), false);
}
@ -305,7 +305,7 @@ void ColorSelector::findBestfitIndex(const app::Color& color)
// Search for the closest color to the RGB values
int i = get_current_palette()->findBestfit(r, g, b);
if (i >= 0 && i < 256) {
m_colorPalette.clearSelection();
m_colorPalette.deselect();
m_colorPalette.selectColor(i, false);
}
}

View File

@ -101,7 +101,7 @@ void PaletteView::setColumns(int columns)
}
}
void PaletteView::clearSelection()
void PaletteView::deselect()
{
bool invalidate = (m_selectedEntries.picks() > 0);
@ -306,7 +306,7 @@ bool PaletteView::onProcessMessage(Message* msg)
if (hasCapture() && (idx != m_currentEntry || msg->type() == kMouseDownMessage)) {
if (!msg->ctrlPressed())
clearSelection();
deselect();
if (msg->type() == kMouseMoveMessage)
selectRange(m_rangeAnchor, idx);

View File

@ -51,7 +51,7 @@ namespace app {
int getColumns() const { return m_columns; }
void setColumns(int columns);
void clearSelection();
void deselect();
void selectColor(int index, bool startRange);
void selectRange(int index1, int index2);