diff options
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 867d2a32..6efd58ed 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1011,12 +1011,19 @@ void MainWindow::openPrevious(Qt::MouseButtons btn) QWebHistory *history = currentTab()->view()->history(); if (history->canGoBack()) { - KUrl back = history->backItem().url(); if(btn == Qt::MidButton) + { + KUrl back = history->backItem().url(); Application::instance()->loadUrl(back, Rekonq::SettingOpenTab); + } else - Application::instance()->loadUrl(back); + { + history->goToItem(history->backItem()); + } + + updateActions(); } + } @@ -1025,11 +1032,16 @@ void MainWindow::openNext(Qt::MouseButtons btn) QWebHistory *history = currentTab()->view()->history(); if (history->canGoForward()) { - KUrl next = history->forwardItem().url(); if(btn == Qt::MidButton) + { + KUrl next = history->forwardItem().url(); Application::instance()->loadUrl(next, Rekonq::SettingOpenTab); + } else - Application::instance()->loadUrl(next); + { + history->goToItem(history->forwardItem()); + } + updateActions(); } } |