summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2010-03-03 11:46:07 +0100
committerYoann Laissus <yoann.laissus@gmail.com>2010-03-03 11:46:07 +0100
commit1255296a1bdf0a2f4e3baa1992bb80d224f33941 (patch)
tree1ce86fd378f23a58338256a88374db2dcca70ab8 /src/mainwindow.cpp
parentRemoving call to non-extant slot.. (diff)
downloadrekonq-1255296a1bdf0a2f4e3baa1992bb80d224f33941.tar.xz
Fix the scroll problem with the workaround of findText() (spotted by Darjus Loktevic)
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 39dd9a40..5df226df 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -795,8 +795,10 @@ void MainWindow::findNext()
if(m_findBar->isHidden())
{
- currentTab()->view()->page()->focusNextPrevChild(true);
- return;
+ QPoint test = currentTab()->view()->page()->currentFrame()->scrollPosition();
+ currentTab()->view()->page()->focusNextPrevChild(true);
+ currentTab()->view()->page()->currentFrame()->setScrollPosition(test);
+ return;
}
QWebPage::FindFlags options = QWebPage::FindWrapsAroundDocument;
@@ -806,7 +808,11 @@ void MainWindow::findNext()
bool found = currentTab()->view()->findText(m_lastSearch, options);
m_findBar->notifyMatch(found);
if(!found)
- currentTab()->view()->page()->focusNextPrevChild(true);
+ {
+ QPoint test = currentTab()->view()->page()->currentFrame()->scrollPosition();
+ currentTab()->view()->page()->focusNextPrevChild(true);
+ currentTab()->view()->page()->currentFrame()->setScrollPosition(test);
+ }
}
@@ -821,8 +827,6 @@ void MainWindow::findPrevious()
bool found = currentTab()->view()->findText(m_lastSearch, options);
m_findBar->notifyMatch(found);
- if(!found)
- currentTab()->view()->page()->focusNextPrevChild(true);
}