diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/browsertab.cpp | 3 | ||||
| -rw-r--r-- | src/mainwindow.cpp | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/browsertab.cpp b/src/browsertab.cpp index e397f0f..b2a31a1 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -195,7 +195,7 @@ void BrowserTab::navigateTo(const QUrl &url, PushToHistory mode, RequestFlags fl this->successfully_loaded = false; this->timer.start(); - if(not this->startRequest(url, ProtocolHandler::Default, flags)) { + if(!this->lazy_loading && not this->startRequest(url, ProtocolHandler::Default, flags)) { QMessageBox::critical(this, tr("Kristall"), tr("Failed to execute request to %1").arg(url.toString())); return; } @@ -263,6 +263,7 @@ void BrowserTab::scrollToAnchor(QString const &anchor) void BrowserTab::reloadPage() { + lazy_loading = false; if (current_location.isValid()) this->navigateTo(this->current_location, DontPush, RequestFlags::DontReadFromCache); } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index dc97ebd..4c7169b 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -169,10 +169,8 @@ BrowserTab * MainWindow::addNewTab(bool focus_new, QUrl const & url, bool lazylo tab->current_location = url; tab->lazy_loading = true; } - else - { - tab->navigateTo(url, BrowserTab::PushImmediate); - } + + tab->navigateTo(url, BrowserTab::PushImmediate); if (!defaultTitle.isEmpty()) { @@ -387,7 +385,6 @@ void MainWindow::on_browser_tabs_currentChanged(int index) if (tab->lazy_loading) { tab->reloadPage(); - tab->lazy_loading = false; } this->setRequestState(tab->request_state); |
