From c8f16eaa9701d21f4ef9877a2804911f0a8c7577 Mon Sep 17 00:00:00 2001 From: Martyn Gigg <martyn.gigg@stfc.ac.uk> Date: Mon, 10 May 2010 07:41:37 +0000 Subject: [PATCH] Fixes for Red hat python problems with PYTHONPATH noticed by Pascal. Re #1221 --- Code/qtiplot/qtiplot/mantidplotrc.py | 3 +++ Code/qtiplot/qtiplot/src/main.cpp | 13 ------------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Code/qtiplot/qtiplot/mantidplotrc.py b/Code/qtiplot/qtiplot/mantidplotrc.py index adc28676547..ca04d82a695 100644 --- a/Code/qtiplot/qtiplot/mantidplotrc.py +++ b/Code/qtiplot/qtiplot/mantidplotrc.py @@ -75,5 +75,8 @@ if __name__ == '__main__': calltip = args[index] + "," + calltip calltip = '(' + calltip.rstrip(',') + ')' return calltip + + import sys + sys.path.insert(0,'') else: raise ImportError("mantidplotrc.py is an initialization file for MantidPlot not an importable module") diff --git a/Code/qtiplot/qtiplot/src/main.cpp b/Code/qtiplot/qtiplot/src/main.cpp index 8da39551f41..fa1735f778b 100644 --- a/Code/qtiplot/qtiplot/src/main.cpp +++ b/Code/qtiplot/qtiplot/src/main.cpp @@ -161,25 +161,12 @@ int main( int argc, char ** argv ) app.processEvents(); splash.showMessage("Release: " + QString(MANTIDPLOT_RELEASE_DATE),Qt::AlignLeft | Qt::AlignBottom); - QString path = argv[0]; - int i = path.lastIndexOf('/'); - if (i < 0) i = path.lastIndexOf('\\'); - if (i>=0) - { - path.remove(i,1000); - QDir::setCurrent(path); - } - bool factorySettings = false; if (args.contains("-d") || args.contains("--default-settings")) factorySettings = true; ApplicationWindow *mw = new ApplicationWindow(factorySettings); mw->restoreApplicationGeometry(); - /*if (mw->autoSearchUpdates){ - mw->autoSearchUpdatesRequest = true; - mw->searchForUpdates(); - }*/ mw->parseCommandLineArguments(args); t.wait(); splash.finish(mw); -- GitLab