As on request, let the side pane help open and follow help mode.

Reviewed-by: Daniel Molkentin
This commit is contained in:
kh
2009-06-02 16:30:56 +02:00
parent e9b2613dc0
commit d8cca2b79d
2 changed files with 21 additions and 0 deletions

View File

@@ -407,6 +407,11 @@ void HelpPlugin::createRightPaneSideBar()
<< m_core->uniqueIDManager()->uniqueIdentifier(Constants::C_HELP_SIDEBAR),
this));
connect(m_centralWidget, SIGNAL(sourceChanged(QUrl)), this,
SLOT(updateSideBarSource(QUrl)));
connect(m_centralWidget, SIGNAL(currentViewerChanged()), this,
SLOT(updateSideBarSource()));
QAction *copyActionSideBar = new QAction(this);
Core::Command *cmd = m_core->actionManager()->registerAction(copyActionSideBar,
Core::Constants::COPY, QList<int>()
@@ -565,6 +570,19 @@ void HelpPlugin::openContextHelpPage(const QString &url)
m_helpViewerForSideBar->setSource(QUrl(url));
}
void HelpPlugin::updateSideBarSource()
{
const QUrl &url = m_centralWidget->currentSource();
if (url.isValid())
updateSideBarSource(url);
}
void HelpPlugin::updateSideBarSource(const QUrl &newUrl)
{
if (m_helpViewerForSideBar)
m_helpViewerForSideBar->setSource(newUrl);
}
void HelpPlugin::activateContext()
{
using namespace Core;