for ( itProd = productsMap.begin(); itProd != productsMap.end(); ++itProd ) {
bool srcctx = itProd.data().hasContext( "salome sources" );
bool binctx = itProd.data().hasContext( "salome binaries" );
- if ( srcctx ) totSrc++;
- if ( binctx ) totBin++;
- if ( srcctx && !binctx && productsView->isSources( itProd.key() ) )
- selSrc++;
- if ( !srcctx && binctx && productsView->isBinaries( itProd.key() ) )
- selBin++;
- if ( srcctx && binctx &&
- ( productsView->isSources( itProd.key() ) ||
- productsView->isBinaries( itProd.key() ) ) ) {
- selSrc++;
- selBin++;
+ if ( srcctx && !binctx ) {
+ totSrc++;
+ if ( productsView->isSources( itProd.key() ) )
+ selSrc++;
+ }
+ if ( binctx && !srcctx ) {
+ totBin++;
+ if ( productsView->isBinaries( itProd.key() ) )
+ selBin++;
}
}
selectSrcBtn->blockSignals( true );
MapProducts::Iterator itProd;
for ( itProd = productsMap.begin(); itProd != productsMap.end(); ++itProd ) {
if ( itProd.data().hasContext( "salome sources" ) ) {
- if ( checkBox->state() == QButton::Off )
- productsView->setNone( itProd.key() );
+ if ( checkBox->state() == QButton::Off ) {
+ int selBin = 0;
+ MapProducts::Iterator itProd1;
+ for ( itProd1 = productsMap.begin(); itProd1 != productsMap.end(); ++itProd1 ) {
+ if ( itProd1.data().hasContext( "salome binaries" ) &&
+ !itProd1.data().hasContext( "salome sources" ) &&
+ productsView->isBinaries( itProd1.key() ) )
+ selBin++;
+ }
+ if ( !itProd.data().hasContext( "salome binaries" ) || !selBin )
+ productsView->setNone( itProd.key() );
+ }
else {
productsView->setSources( itProd.key() );
if ( prerequisites->isChecked() )
MapProducts::Iterator itProd;
for ( itProd = productsMap.begin(); itProd != productsMap.end(); ++itProd ) {
if ( itProd.data().hasContext( "salome binaries" ) ) {
- if ( checkBox->state() == QButton::Off )
- productsView->setNone( itProd.key() );
+ if ( checkBox->state() == QButton::Off ) {
+ int selSrc = 0;
+ MapProducts::Iterator itProd1;
+ for ( itProd1 = productsMap.begin(); itProd1 != productsMap.end(); ++itProd1 ) {
+ if ( itProd1.data().hasContext( "salome sources" ) &&
+ !itProd1.data().hasContext( "salome binaries" ) &&
+ productsView->isSources( itProd1.key() ) )
+ selSrc++;
+ }
+ if ( !itProd.data().hasContext( "salome sources" ) || !selSrc )
+ productsView->setNone( itProd.key() );
+ }
else {
productsView->setBinaries( itProd.key() );
if ( prerequisites->isChecked() )