Returns the UI color for the measurement `object`.
| 10 | |
| 11 | // Returns the UI color for the measurement `object`. |
| 12 | static Color getMeasurementColor( const VisualObject& object, ViewportId viewport ) |
| 13 | { |
| 14 | // If our parent is a feature and we're not selected, copy its color. |
| 15 | if ( !object.isSelected() ) |
| 16 | { |
| 17 | if ( auto feature = dynamic_cast<const FeatureObject*>( object.parent() ) ) |
| 18 | return feature->getFrontColor( feature->isSelected(), viewport ); |
| 19 | } |
| 20 | |
| 21 | // Otherwise use our own color. |
| 22 | return object.getFrontColor( object.isSelected(), viewport ); |
| 23 | } |
| 24 | |
| 25 | MR_REGISTER_RENDER_OBJECT_IMPL( PointMeasurementObject, RenderPointObject ) |
| 26 | RenderPointObject::RenderPointObject( const VisualObject& object ) |
no test coverage detected