Skip to content

Commit

Permalink
fix: broken flamegraph
Browse files Browse the repository at this point in the history
Apparently when running X11 the flamgraph doesn't clear the background
correctly. This patch resets the background brush which clears the
background correctly.

fixes: #624
  • Loading branch information
lievenhey committed Nov 15, 2024
1 parent eb3b7b2 commit 0bd3ee4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/flamegraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1189,11 +1189,11 @@ void FlameGraph::selectItem(FrameGraphicsItem* item)
// then layout all items below the selected on
layoutItems(item);

#if QT_VERSION <= QT_VERSION_CHECK(5, 15, 12) && QT_VERSION > QT_VERSION_CHECK(5, 15, 10)
// #if QT_VERSION <= QT_VERSION_CHECK(5, 15, 12) && QT_VERSION > QT_VERSION_CHECK(5, 15, 10)
// the scene background doesn't get cleared correctly when using qt 5.15.12
// this doesn't happen in 5.15.10 and 5.15.13
m_scene->setBackgroundBrush(QBrush());
#endif
// #endif

// Triggers a refresh of the scene's bounding rect without going via the
// event loop. This makes the centerOn call below work as expected in all cases.
Expand Down

0 comments on commit 0bd3ee4

Please sign in to comment.