Fix for the "0051573: TC6.6.0: Clipping - Select all check-box behavior is wrong" issue.

This commit is contained in:
ana 2012-11-08 15:07:36 +00:00
parent 70bcc2ddff
commit 48fb343b63

View File

@ -742,14 +742,8 @@ void SMESHGUI_ClippingDlg::updateActorItem( QListWidgetItem* theItem,
if( anItem->checkState() == Qt::Checked ) if( anItem->checkState() == Qt::Checked )
aNbChecked++; aNbChecked++;
Qt::CheckState aCheckState = Qt::Unchecked;
if( aNbChecked == aNbItems )
aCheckState = Qt::Checked;
else if( aNbChecked > 0 )
aCheckState = Qt::PartiallyChecked;
bool anIsBlocked = SelectAllCheckBox->blockSignals( true ); bool anIsBlocked = SelectAllCheckBox->blockSignals( true );
SelectAllCheckBox->setCheckState( aCheckState ); SelectAllCheckBox->setCheckState( aNbChecked == aNbItems ? Qt::Checked : Qt::Unchecked);
SelectAllCheckBox->blockSignals( anIsBlocked ); SelectAllCheckBox->blockSignals( anIsBlocked );
} }