[nostalgia/core/studio] Fix color selection change detection to work with dragging

This commit is contained in:
Gary Talent 2020-09-01 20:52:33 -05:00
parent ca920e5769
commit 87c428f422

View File

@ -347,7 +347,8 @@ Color16 PaletteEditor::rowColor(int row) const {
} }
void PaletteEditor::colorSelected() { void PaletteEditor::colorSelected() {
auto row = m_table->currentRow(); auto selIdxs = m_table->selectionModel()->selectedIndexes();
auto row = selIdxs.size() ? selIdxs[0].row() : -1;
if (row > -1) { if (row > -1) {
m_rmBtn->setEnabled(true); m_rmBtn->setEnabled(true);
m_moveUpBtn->setEnabled(row > 0); m_moveUpBtn->setEnabled(row > 0);