From fb54d4da487fe87636fb8be042df752702d8051b Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 25 Mar 2010 12:04:11 +0100 Subject: Fixed a regression (history NOT modified) introduced with commit 29e095b81d2. Ehi guys, please take FULL attention, modifying working code.. --- src/mainwindow.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 68469cdd..6a17d1b8 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1009,12 +1009,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(); } + } @@ -1023,11 +1030,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(); } } -- cgit v1.2.1