Focus palette or tiles view when we select a set of colors/tiles

E.g. with this we can selected unused colors and then press Delete key
to remove those colors.
This commit is contained in:
David Capello 2021-05-20 18:03:07 -03:00
parent 2bc64cf5ff
commit 95a44f5d68

View File

@ -487,6 +487,10 @@ void PaletteView::setSelectedEntries(const doc::PalettePicks& entries)
m_selectedEntries = entries;
m_selectedEntries.resize(m_adapter->size());
m_currentEntry = m_selectedEntries.firstPick();
if (entries.picks() > 0)
requestFocus();
invalidate();
}