Commit 2bbf8241 authored by Timothée Giet's avatar Timothée Giet

fix checkbox in preset editor left column

fix checkbox in preset editor left column
patch by Jouni Pentikäinen, thanks.
BUG:340573
parent f8f872bd
......@@ -81,6 +81,8 @@ KisPaintOpOptionsWidget::KisPaintOpOptionsWidget(QWidget * parent)
connect(m_d->optionsList, SIGNAL(doubleClicked(QModelIndex)) , this, SLOT(lockProperties(const QModelIndex&)));
connect(m_d->optionsList, SIGNAL(rightClickedMenuDropSettingsTriggered()) , this, SLOT(slotLockPropertiesDrop()));
connect(m_d->optionsList, SIGNAL(rightClickedMenuSaveSettingsTriggered()) , this, SLOT(slotLockPropertiesSave()));
connect(m_d->optionsList, SIGNAL(sigEntryChecked(QModelIndex)), this, SLOT(slotEntryChecked(QModelIndex)));
}
......
......@@ -102,12 +102,11 @@ void KisCategorizedListView::mousePressEvent(QMouseEvent* event)
}
}
QModelIndex index = QListView::indexAt(event->pos());
QListView::mousePressEvent(event);
if(index.data(__CategorizedListModelBase::isToggledRole).toBool() && index.isValid()){
emit sigEntryChecked(index);
}
if(event->button() == Qt::RightButton){
QModelIndex index = QListView::indexAt(event->pos());
QMenu menu(this);
if(index.data(__CategorizedListModelBase::isLockableRole).toBool() && index.isValid()){
QAction* action1 = menu.addAction(koIcon("linked2"),index.data(__CategorizedListModelBase::isLockedRole).toBool()?i18n("Unlock (Drop Locked)"):i18n("Lock"));
......@@ -124,6 +123,11 @@ void KisCategorizedListView::mousePressEvent(QMouseEvent* event)
void KisCategorizedListView::mouseReleaseEvent(QMouseEvent* event)
{
QListView::mouseReleaseEvent(event);
QModelIndex index = QListView::indexAt(event->pos());
if(index.data(__CategorizedListModelBase::isToggledRole).toBool() && index.isValid()){
emit sigEntryChecked(index);
}
}
......
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