summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-03-03 14:19:43 +0100
committerAndrea Diamantini <adjam7@gmail.com>2010-03-03 14:19:43 +0100
commit978eb92ddd4479eca1de63f4cd0ac65ca8686265 (patch)
tree0f9c412d5d80e49f5222c8036c61b886f6c884e7 /src/mainwindow.cpp
parentFix compile :/ (diff)
parentvariable names ... (diff)
downloadrekonq-978eb92ddd4479eca1de63f4cd0ac65ca8686265.tar.xz
Fix merge
Merge commit 'refs/merge-requests/101' of git://gitorious.org/rekonq/mainline into AfterLastFindBarFixes Conflicts: src/mainwindow.cpp
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index a09c25e8..a02910fd 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -783,7 +783,7 @@ void MainWindow::matchCaseUpdate()
if (!currentTab())
return;
- currentTab()->view()->findText(m_lastSearch, QWebPage::FindBackward | QWebPage::FindWrapsAroundDocument);
+ currentTab()->view()->findText(m_lastSearch, QWebPage::FindBackward);
findNext();
}
@@ -794,7 +794,12 @@ void MainWindow::findNext()
return;
if(m_findBar->isHidden())
+ {
+ QPoint previous_position = currentTab()->view()->page()->currentFrame()->scrollPosition();
+ currentTab()->view()->page()->focusNextPrevChild(true);
+ currentTab()->view()->page()->currentFrame()->setScrollPosition(previous_position);
return;
+ }
QWebPage::FindFlags options = QWebPage::FindWrapsAroundDocument;
if (m_findBar->matchCase())
@@ -802,6 +807,13 @@ void MainWindow::findNext()
bool found = currentTab()->view()->findText(m_lastSearch, options);
m_findBar->notifyMatch(found);
+
+ if(!found)
+ {
+ QPoint previous_position = currentTab()->view()->page()->currentFrame()->scrollPosition();
+ currentTab()->view()->page()->focusNextPrevChild(true);
+ currentTab()->view()->page()->currentFrame()->setScrollPosition(previous_position);
+ }
}