From b36bbdc3c0e8b560eb772c83e0ef49198196da45 Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Date: Thu, 5 Aug 2021 13:09:17 -0300 Subject: [PATCH] CP Chart - Reposition model helper when off window This is already fixed when it is out to the right, but still can happen to the left. Fixes #3995 --- src/Charts/CriticalPowerWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Charts/CriticalPowerWindow.cpp b/src/Charts/CriticalPowerWindow.cpp index 8b773157f..3c51bf327 100644 --- a/src/Charts/CriticalPowerWindow.cpp +++ b/src/Charts/CriticalPowerWindow.cpp @@ -1365,7 +1365,8 @@ CriticalPowerWindow::event(QEvent *event) } // if off the screen move on screen - if (helperWidget()->geometry().x() > geometry().width()) { + if (helperWidget()->geometry().x() > geometry().width() || + helperWidget()->geometry().x() < geometry().x()) { helperWidget()->move(mainWidget()->geometry().width()-(275*dpiXFactor), 50*dpiYFactor); } }