diff --git a/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/MdViewerWidget.cpp b/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/MdViewerWidget.cpp index 6ffd05e4eba3..3142feedc292 100644 --- a/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/MdViewerWidget.cpp +++ b/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/MdViewerWidget.cpp @@ -252,16 +252,18 @@ void MdViewerWidget::createAppCoreForPlugin() if (!pqApplicationCore::instance()) { // Provide ParaView's application core with a path to ParaView - int argc = 1; - std::string paraviewPath = Mantid::Kernel::ConfigService::Instance().getParaViewPath(); + if(paraviewPath.empty()) + { + // ParaView crashes with an empty string but on Linux/OSX we dont set this property + paraviewPath = "/tmp/MantidPlot"; + } std::vector argvConversion(paraviewPath.begin(), paraviewPath.end()); argvConversion.push_back('\0'); + int argc = 1; char *argv[] = {&argvConversion[0]}; - g_log.debug() << "Intialize pqApplicationCore with " << argv << "\n"; - new pqPVApplicationCore(argc, argv); } else diff --git a/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/ThreesliceView.cpp b/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/ThreesliceView.cpp index bc67d528228d..a80dc11a147d 100644 --- a/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/ThreesliceView.cpp +++ b/Code/Mantid/Vates/VatesSimpleGui/ViewWidgets/src/ThreesliceView.cpp @@ -43,13 +43,17 @@ ThreeSliceView::ThreeSliceView(QWidget *parent) : ViewBase(parent) { this->ui.setupUi(this); - // We need to load the QuadView.dll plugin. The Windows system requires the full + // We need to load the QuadView plugin + QString quadViewLibrary; +#ifdef Q_OS_WIN32 + // Windows requires the full // path information. The DLL is located in the apropriate executeable path of paraview. const Poco::Path paraviewPath(Mantid::Kernel::ConfigService::Instance().getParaViewPath()); - Poco::Path quadViewFullPath(paraviewPath, QUADVIEW_LIBRARY.toStdString()); - - QString quadViewLibrary(quadViewFullPath.toString().c_str()); + quadViewLibrary = quadViewFullPath.toString().c_str(); +#else + quadViewLibrary = QUADVIEW_LIBRARY; +#endif // Need to load plugin pqPluginManager* pm = pqApplicationCore::instance()->getPluginManager(); @@ -57,7 +61,7 @@ ThreeSliceView::ThreeSliceView(QWidget *parent) : ViewBase(parent) pm->loadExtension(pqActiveObjects::instance().activeServer(), quadViewLibrary, &error, false); - g_log.debug() << "Loading QuadView.dll from " << quadViewLibrary.toStdString() << "\n"; + g_log.debug() << "Loading QuadView library from " << quadViewLibrary.toStdString() << "\n"; this->mainView = this->createRenderView(this->ui.mainRenderFrame, QString("pqQuadView"));