Don't switch to Help mode if help side bar is already visible.

This commit is contained in:
con
2009-12-21 12:16:22 +01:00
parent 3cf861a8ce
commit 031d6c1690

View File

@@ -738,13 +738,15 @@ HelpViewer* HelpPlugin::viewerForContextMode()
{
HelpViewer *viewer = 0;
bool showSideBySide = false;
Core::RightPanePlaceHolder* placeHolder = Core::RightPanePlaceHolder::current();
Core::IEditor *editor = Core::EditorManager::instance()->currentEditor();
switch (m_helpEngine->customValue(QLatin1String("ContextHelpOption"), 0).toInt())
{
case 0: // side by side if possible
{
if (Core::IEditor *editor = Core::EditorManager::instance()->currentEditor()) {
if (editor->widget() && editor->widget()->isVisible() && editor->widget()->width() < 800 )
if ((!placeHolder || !placeHolder->isVisible()) && editor) {
if (!editor->widget() && editor->widget()->isVisible() && editor->widget()->width() < 800 )
break;
}
}
@@ -756,7 +758,6 @@ HelpViewer* HelpPlugin::viewerForContextMode()
break;
}
Core::RightPanePlaceHolder* placeHolder = Core::RightPanePlaceHolder::current();
if (placeHolder && showSideBySide) {
Core::RightPaneWidget::instance()->setShown(true);
viewer = m_helpViewerForSideBar;