From cc7e50e3e088dd0baa52e8e95c8a228be7366597 Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Thu, 14 Mar 2024 13:39:36 -0700 Subject: [PATCH] gui: fix problems when saving a CTS clock tree view Sometimes the view would come out as a uselessly small image. I've added what should be a no-op but empirically fixes the problem for reasons I don't understand. Signed-off-by: Matt Liberty --- src/gui/src/clockWidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/src/clockWidget.cpp b/src/gui/src/clockWidget.cpp index 90236393d45..07bb7523640 100644 --- a/src/gui/src/clockWidget.cpp +++ b/src/gui/src/clockWidget.cpp @@ -1495,6 +1495,7 @@ void ClockWidget::saveImage(const std::string& clock_name, if (height_px.has_value()) { view_size.setHeight(height_px.value()); } + print_view.scale(1, 1); // mysteriously necessary sometimes print_view.resize(view_size); // Ensure the new view is sized correctly by Qt by processing the event // so fit will work