Remove superfluous area check
If area.contains(geometry.topLeft()) is false this does nothing anyway
This commit is contained in:
parent
411607897f
commit
1e62fe99bd
1 changed files with 5 additions and 7 deletions
|
@ -1523,13 +1523,11 @@ void Window::keepInArea(QRect area, bool partial)
|
||||||
geometry.moveBottom(area.bottom());
|
geometry.moveBottom(area.bottom());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!area.contains(geometry.topLeft())) {
|
if (geometry.left() < area.left()) {
|
||||||
if (geometry.left() < area.left()) {
|
geometry.moveLeft(area.left());
|
||||||
geometry.moveLeft(area.left());
|
}
|
||||||
}
|
if (geometry.top() < area.top()) {
|
||||||
if (geometry.top() < area.top()) {
|
geometry.moveTop(area.top());
|
||||||
geometry.moveTop(area.top());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (moveResizeGeometry().topLeft() != geometry.topLeft()) {
|
if (moveResizeGeometry().topLeft() != geometry.topLeft()) {
|
||||||
|
|
Loading…
Reference in a new issue