#1075 Fixed toggle of single item when two items are selected

This commit is contained in:
Magne Sjaastad 2017-01-09 14:14:06 +01:00
parent 0fd3bc8865
commit 95b7ce73ee

View File

@ -290,7 +290,10 @@ void PdmUiListEditor::slotSelectionChanged(const QItemSelection & selected, cons
{
QModelIndexList idxList = m_listView->selectionModel()->selectedIndexes();
if (idxList.size() == 1)
QVariant fieldValue = field()->uiValue();
QList<QVariant> valuesSelectedInField = fieldValue.toList();
if (idxList.size() == 1 && valuesSelectedInField.size() == 1)
{
// NOTE : Workaround for update issue seen on RHEL6 with Qt 4.6.2
// An invalid call to setSelection() from QAbstractItemView::keyPressEvent() causes the stepping using arrow keys