Skip to content
Snippets Groups Projects
Commit 04303f0e authored by andreas's avatar andreas
Browse files

bugfix for file_browser in the mac specific section

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2476 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 7606ebdd
No related branches found
No related tags found
No related merge requests found
......@@ -60,8 +60,8 @@ FileBrowser::FileBrowser(QWidget* parent):
Widget(NULL, parent)
{
QString path=QDir::currentPath();
QDir dir(QCoreApplication::applicationDirPath());
# if defined(_MSC_VER)
QDir dir(QCoreApplication::applicationDirPath());
dir.cdUp();
dir.cdUp();
path=dir.path();
......@@ -72,11 +72,15 @@ FileBrowser::FileBrowser(QWidget* parent):
# elif defined(__APPLE__)
if (path.contains("DNG.app") || path=="/") {
QString example_path="/Applications/OpenStructure/Examples/";
dir.cdUp();
QString example_path=dir.path()+"/examples";
if (QDir(example_path).exists()) {
path=example_path;
}
} else{
dir.cdUp();
example_path=dir.path()+"/examples";
if (QDir(example_path).exists()) {
path=example_path;
}
}
}
#endif
this->Init(path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment