@@ -400,7 +400,7 @@ int TimelineItemThread::PreprocessGhostLevel( const TimelineContext& ctx, const
400
400
}
401
401
#endif
402
402
403
- int TimelineItemThread::PreprocessZoneLevel ( const TimelineContext& ctx, const Vector<short_ptr<ZoneEvent>>& vec, int depth, bool visible, uint32_t inheritedColor )
403
+ int TimelineItemThread::PreprocessZoneLevel ( const TimelineContext& ctx, const Vector<short_ptr<ZoneEvent>>& vec, int depth, bool visible, const uint32_t inheritedColor )
404
404
{
405
405
if ( vec.is_magic () )
406
406
{
@@ -413,7 +413,7 @@ int TimelineItemThread::PreprocessZoneLevel( const TimelineContext& ctx, const V
413
413
}
414
414
415
415
template <typename Adapter, typename V>
416
- int TimelineItemThread::PreprocessZoneLevel ( const TimelineContext& ctx, const V& vec, int depth, bool visible, uint32_t inheritedColor )
416
+ int TimelineItemThread::PreprocessZoneLevel ( const TimelineContext& ctx, const V& vec, int depth, bool visible, const uint32_t inheritedColor )
417
417
{
418
418
const auto vStart = ctx.vStart ;
419
419
const auto vEnd = ctx.vEnd ;
@@ -458,6 +458,7 @@ int TimelineItemThread::PreprocessZoneLevel( const TimelineContext& ctx, const V
458
458
{
459
459
const auto hasChildren = ev.HasChildren ();
460
460
auto currentInherited = inheritedColor;
461
+ auto childrenInherited = inheritedColor;
461
462
if ( m_view.GetViewData ().inheritParentColors )
462
463
{
463
464
uint32_t color = 0 ;
@@ -474,12 +475,12 @@ int TimelineItemThread::PreprocessZoneLevel( const TimelineContext& ctx, const V
474
475
if ( color != 0 )
475
476
{
476
477
currentInherited = color | 0xFF000000 ;
477
- if ( hasChildren ) inheritedColor = DarkenColorSlightly ( color );
478
+ if ( hasChildren ) childrenInherited = DarkenColorSlightly ( color );
478
479
}
479
480
}
480
481
if ( hasChildren )
481
482
{
482
- const auto d = PreprocessZoneLevel ( ctx, m_worker.GetZoneChildren ( ev.Child () ), depth + 1 , visible, inheritedColor );
483
+ const auto d = PreprocessZoneLevel ( ctx, m_worker.GetZoneChildren ( ev.Child () ), depth + 1 , visible, childrenInherited );
483
484
if ( d > maxdepth ) maxdepth = d;
484
485
}
485
486
if ( visible ) m_draw.emplace_back ( TimelineDraw { TimelineDrawType::Zone, uint16_t ( depth ), (void **)&ev, 0 , 0 , currentInherited } );
0 commit comments