Skip to content

Commit

Permalink
disabled checkboxes in raster pipes tab
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Jul 17, 2012
1 parent 3ed53c2 commit 617d73f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -1646,10 +1646,14 @@ void QgsRasterLayerProperties::updatePipeList()
texts << QString( "%1 ms" ).arg( interface->time() );
QTreeWidgetItem *item = new QTreeWidgetItem( texts );

bool on = interface->on();
item->setCheckState( 0, on ? Qt::Checked : Qt::Unchecked );

Qt::ItemFlags flags = Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDragEnabled;
// Switching on/off would be possible but problematic - drawer is not pipe
// memer so we dont know required output format
// Checkobxes are very usefel however for QgsRasterPipe debugging.
//bool on = interface->on();
//item->setCheckState( 0, on ? Qt::Checked : Qt::Unchecked );

//Qt::ItemFlags flags = Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDragEnabled;
Qt::ItemFlags flags = Qt::ItemIsEnabled;
item->setFlags( flags );

mPipeTreeWidget->addTopLevelItem( item );
Expand Down Expand Up @@ -1682,6 +1686,8 @@ void QgsRasterLayerProperties::updatePipeItems()
QgsRasterInterface * interface = pipe->at( i );
QTreeWidgetItem *item = mPipeTreeWidget->topLevelItem( i );
if ( !item ) continue;
// Checkboxes disabled for now, see above
/*
bool on = interface->on();
Qt::ItemFlags flags = item->flags();
if ( pipe->canSetOn( i, !on ) )
Expand All @@ -1693,5 +1699,6 @@ void QgsRasterLayerProperties::updatePipeItems()
flags |= ( Qt::ItemFlags )~Qt::ItemIsUserCheckable;
}
item->setFlags( flags );
*/
}
}

0 comments on commit 617d73f

Please sign in to comment.