Skip to content

Commit

Permalink
CP Chart - Reposition model helper when off window
Browse files Browse the repository at this point in the history
This is already fixed when it is out to the right,
but still can happen to the left.

Fixes #3995
  • Loading branch information
amtriathlon committed Aug 5, 2021
1 parent 00b50b4 commit b36bbdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Charts/CriticalPowerWindow.cpp
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit b36bbdc

Please sign in to comment.