diff options
Diffstat (limited to 'src/gui/itemviews/qstyleditemdelegate.cpp')
-rw-r--r-- | src/gui/itemviews/qstyleditemdelegate.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui/itemviews/qstyleditemdelegate.cpp b/src/gui/itemviews/qstyleditemdelegate.cpp index 9aac554..880f8ab 100644 --- a/src/gui/itemviews/qstyleditemdelegate.cpp +++ b/src/gui/itemviews/qstyleditemdelegate.cpp @@ -747,13 +747,8 @@ bool QStyledItemDelegate::editorEvent(QEvent *event, return false; } - Qt::CheckState state; - if ( flags & Qt::ItemIsTristate ) { - state = static_cast<Qt::CheckState>( (value.toInt() + 1) % 3 ); - } else { - state = (static_cast<Qt::CheckState>(value.toInt()) == Qt::Checked + Qt::CheckState state = (static_cast<Qt::CheckState>(value.toInt()) == Qt::Checked ? Qt::Unchecked : Qt::Checked); - } return model->setData(index, state, Qt::CheckStateRole); } |