Skip to content

Commit

Permalink
made read-only properties appear as disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
David Gossow committed Jul 12, 2013
1 parent 6ee3213 commit c6dacb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rviz/properties/property.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ 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 = ( parent_ && parent_->getDisableChildren() ) ? Qt::NoItemFlags : Qt::ItemIsEnabled;
Qt::ItemFlags enabled_flag = is_read_only_ || ( parent_ && parent_->getDisableChildren() ) ? Qt::NoItemFlags : Qt::ItemIsEnabled;

if( column == 0 || is_read_only_ )
if( column == 0 )
{
return enabled_flag | Qt::ItemIsSelectable;
}
Expand Down

0 comments on commit c6dacb1

Please sign in to comment.