From 687b1460b969af4f942233605abcca3a9b3c7f23 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 5 Dec 2014 09:37:05 -0600 Subject: Fix rare incorrect section display on load request when khelpcenter instance already running This resolves Bug 2188 --- khelpcenter/mainwindow.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'khelpcenter/mainwindow.cpp') diff --git a/khelpcenter/mainwindow.cpp b/khelpcenter/mainwindow.cpp index c2246232a..d99dfcb2b 100644 --- a/khelpcenter/mainwindow.cpp +++ b/khelpcenter/mainwindow.cpp @@ -293,6 +293,8 @@ void MainWindow::viewUrl( const TQString &url ) void MainWindow::viewUrl( const KURL &url, const KParts::URLArgs &args ) { + KParts::URLArgs urlArgs = args; + stop(); TQString proto = url.protocol().lower(); @@ -323,7 +325,15 @@ void MainWindow::viewUrl( const KURL &url, const KParts::URLArgs &args ) History::self().createEntry(); - mDoc->browserExtension()->setURLArgs( args ); + if (mDoc->baseURL() != url) { + if ( proto == "help" ) { + // Ensure that changing the handbook section works by forcing a reload of the page, + // thereby allowing the help tdeioslave to re-parse the fragment identifier + urlArgs.reload = true; + mDoc->gotoAnchor(""); + } + } + mDoc->browserExtension()->setURLArgs( urlArgs ); if ( proto == TQString::fromLatin1("glossentry") ) { TQString decodedEntryId = KURL::decode_string( url.encodedPathAndQuery() ); -- cgit v1.2.1