From 126400709e62496cfdc7f4b8c0ec488e63c8d5d9 Mon Sep 17 00:00:00 2001 From: Lieven Hey Date: Fri, 15 Nov 2024 15:09:51 +0100 Subject: [PATCH] fix: broken flamegraph 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 --- src/flamegraph.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flamegraph.cpp b/src/flamegraph.cpp index 23daae2d..a3432f6c 100644 --- a/src/flamegraph.cpp +++ b/src/flamegraph.cpp @@ -1188,11 +1188,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.