diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 6343df10f1..1c87ebb617 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -691,14 +691,22 @@ void MainWindow::whatsThis() void MainWindow::showDocumentation(const QString& help) { - QUrl url(help); - if (url.scheme().isEmpty()) { - QString page; - page = QString::fromUtf8("%1.html").arg(help); - d->assistant->showDocumentation(page); - } - else { - QDesktopServices::openUrl(url); + // temporary - allows to enable/disable the use of the Help module + ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Help"); + bool useHelpModule = hGrp->GetBool("UseHelpModule", false); + if (useHelpModule) { + Gui::Command::addModule(Gui::Command::Gui,"Help"); + Gui::Command::doCommand(Gui::Command::Gui,"Help.show(\"%s\")", help.toStdString().c_str()); + } else { + QUrl url(help); + if (url.scheme().isEmpty()) { + QString page; + page = QString::fromUtf8("%1.html").arg(help); + d->assistant->showDocumentation(page); + } + else { + QDesktopServices::openUrl(url); + } } }