Skip to content
Permalink
Browse files
fix missing signal on QgsCheckableComboBox (#43487)
  • Loading branch information
3nids committed Jun 1, 2021
1 parent e544cd6 commit 415d4831b05cb3821ccbefe0b67307035bc0fb75
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/gui/qgscheckablecombobox.cpp
@@ -195,6 +195,7 @@ void QgsCheckableComboBox::toggleItemCheckState( int index )
Qt::CheckState state = static_cast<Qt::CheckState>( value.toInt() );
setItemData( index, ( state == Qt::Unchecked ? Qt::Checked : Qt::Unchecked ), Qt::CheckStateRole );
}
updateCheckedItems();
}

void QgsCheckableComboBox::hidePopup()
@@ -262,7 +263,8 @@ bool QgsCheckableComboBox::eventFilter( QObject *object, QEvent *event )
{
QgsCheckableItemModel *myModel = qobject_cast<QgsCheckableItemModel *>( model() );
QStandardItem *item = myModel->itemFromIndex( index );
item->checkState() == Qt::Checked ? item->setCheckState( Qt::Unchecked ) : item->setCheckState( Qt::Checked );
item->setCheckState( item->checkState() == Qt::Checked ? Qt::Unchecked : Qt::Checked );
updateCheckedItems();
}
return true;
}

0 comments on commit 415d483

Please sign in to comment.