Commit e225a7fa authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍
Browse files

Fix the entry selection.

Not sure why this broke?
parent 36d2f605
......@@ -141,12 +141,17 @@ void KisPaletteView::wheelEvent(QWheelEvent *event)
}
void KisPaletteView::entrySelection() {
if (selectedIndexes().last().isValid()) {
QModelIndex index = selectedIndexes().last();
if (!index.isValid()) {
index = selectedIndexes().first();
}
if (!index.isValid()) {
qDebug()<<"invalid";
return;
}
QModelIndex index = selectedIndexes().last();
if (qVariantValue<bool>(index.data(KisPaletteModel::IsHeaderRole))==false) {
KoColorSetEntry entry = m_d->model->colorSetEntryFromIndex(index);
qDebug()<<entry.name;
emit(entrySelected(entry));
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment