mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[escher/scroll_view] Do not compute offset if view invisible
This commit is contained in:
@@ -53,9 +53,16 @@ void ScrollView::scrollToContentPoint(KDPoint p, bool allowOverscroll) {
|
||||
if (!allowOverscroll && !m_contentView->bounds().contains(p)) {
|
||||
return;
|
||||
}
|
||||
|
||||
KDRect visibleRect = visibleContentRect();
|
||||
|
||||
if (visibleRect.width() < 0 || visibleRect.height() < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
KDCoordinate offsetX = 0;
|
||||
KDCoordinate offsetY = 0;
|
||||
KDRect visibleRect = visibleContentRect();
|
||||
|
||||
if (visibleRect.left() > p.x()) {
|
||||
offsetX = p.x() - visibleRect.left();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user