diff --git a/src/rviz/properties/property.cpp b/src/rviz/properties/property.cpp index e0924297d6..f21634bd43 100644 --- a/src/rviz/properties/property.cpp +++ b/src/rviz/properties/property.cpp @@ -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 @@ -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 ) { diff --git a/src/rviz/view_controller.cpp b/src/rviz/view_controller.cpp index b4fa5f1ef0..7c637baec9 100644 --- a/src/rviz/view_controller.cpp +++ b/src/rviz/view_controller.cpp @@ -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 )