Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
David Gossow committed Sep 13, 2013
1 parent 00bca4f commit 5897285
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/rviz/properties/property.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ void Property::setParent( Property* new_parent )

QVariant Property::getViewData( int column, int role ) const
{
if ( role == Qt::TextColorRole &&
( parent_ && parent_->getDisableChildren() ) )
{
return Qt::gray;
}

switch( column )
{
case 0: // left column: names
Expand Down Expand Up @@ -273,7 +279,7 @@ Qt::ItemFlags Property::getViewFlags( int column ) const
{
// if the parent propery is a disabled bool property or
// has its own enabled view flag not set, disable this property as well
Qt::ItemFlags enabled_flag = is_read_only_ || ( parent_ && parent_->getDisableChildren() ) ? Qt::NoItemFlags : Qt::ItemIsEnabled;
Qt::ItemFlags enabled_flag = Qt::ItemIsEnabled;//is_read_only_ || ( parent_ && parent_->getDisableChildren() ) ? Qt::NoItemFlags : Qt::ItemIsEnabled;

if( column == 0 )
{
Expand Down
5 changes: 5 additions & 0 deletions src/rviz/view_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ QString ViewController::formatClassId( const QString& class_id )

QVariant ViewController::getViewData( int column, int role ) const
{
if ( role == Qt::TextColorRole )
{
return QVariant();
}

if( is_active_ )
{
switch( role )
Expand Down

0 comments on commit 5897285

Please sign in to comment.