From 6ce0b032956b21630c899d245e00108547d975c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 28 May 2024 23:37:25 +0200 Subject: [PATCH] Remove the items fromthe scene before setting the scene rect to 0-size Qt 6.7 draws the message item over the tab bar when it is present when shrinking the scene rect. Clear all the items when clearing the scene as a workaround. --- src/GUI/graphview.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/GUI/graphview.cpp b/src/GUI/graphview.cpp index 84bba117..c2039142 100644 --- a/src/GUI/graphview.cpp +++ b/src/GUI/graphview.cpp @@ -442,6 +442,15 @@ void GraphView::clear() _sliderPos = 0; _zoom = 1.0; + removeItem(_xAxis); + removeItem(_yAxis); + removeItem(_xAxisLabel); + removeItem(_yAxisLabel); + removeItem(_slider); + removeItem(_info); + removeItem(_grid); + removeItem(_message); + _scene->setSceneRect(0, 0, 0, 0); }