Commit a5eb8bce authored by Daniel Molkentin's avatar Daniel Molkentin Committed by hjk

Fix context help for examples

- createRightPaneContextViewer() needs to be called up-front. In the old
order, it would fail the first time.

- Queue opening of help, because we need the editor window to be drawn
  before it can be assessed wether to show the help in split mode

Change-Id: Ib2054285efb07ccbfaf3faf089085c16ba432be8z
(cherry picked from commit c86e81c3)
Reviewed-on: http://codereview.qt.nokia.com/149Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 31117038
......@@ -837,9 +837,9 @@ HelpViewer* HelpPlugin::viewerForContextMode()
}
if (placeHolder && showSideBySide) {
createRightPaneContextViewer();
RightPaneWidget::instance()->setWidget(m_rightPaneSideBarWidget);
RightPaneWidget::instance()->setShown(true);
createRightPaneContextViewer();
return m_helpViewerForSideBar;
}
......
......@@ -439,8 +439,12 @@ void GettingStartedWelcomePageWidget::slotOpenExample()
}
if (ProjectExplorer::ProjectExplorerPlugin::instance()->openProject(proFile)) {
Core::ICore::instance()->openFiles(files);
if (!helpFile.isEmpty())
slotOpenContextHelpPage(helpFile);
if (!helpFile.isEmpty()) {
// queue this to make sure it gets executed after the editor widget
// has been drawn, so we know whether to show a split help or not
QMetaObject::invokeMethod(this, "slotOpenContextHelpPage",
Qt::QueuedConnection, Q_ARG(QString, helpFile));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment