forked from qt-creator/qt-creator
Don't switch to Help mode if help side bar is already visible.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user