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
Branches
Tags
No related merge requests found
...@@ -60,8 +60,8 @@ FileBrowser::FileBrowser(QWidget* parent): ...@@ -60,8 +60,8 @@ FileBrowser::FileBrowser(QWidget* parent):
Widget(NULL, parent) Widget(NULL, parent)
{ {
QString path=QDir::currentPath(); QString path=QDir::currentPath();
QDir dir(QCoreApplication::applicationDirPath());
# if defined(_MSC_VER) # if defined(_MSC_VER)
QDir dir(QCoreApplication::applicationDirPath());
dir.cdUp(); dir.cdUp();
dir.cdUp(); dir.cdUp();
path=dir.path(); path=dir.path();
...@@ -72,11 +72,15 @@ FileBrowser::FileBrowser(QWidget* parent): ...@@ -72,11 +72,15 @@ FileBrowser::FileBrowser(QWidget* parent):
# elif defined(__APPLE__) # elif defined(__APPLE__)
if (path.contains("DNG.app") || path=="/") { if (path.contains("DNG.app") || path=="/") {
QString example_path="/Applications/OpenStructure/Examples/"; QString example_path="/Applications/OpenStructure/Examples/";
dir.cdUp();
QString example_path=dir.path()+"/examples";
if (QDir(example_path).exists()) { if (QDir(example_path).exists()) {
path=example_path; path=example_path;
} } else{
dir.cdUp();
example_path=dir.path()+"/examples";
if (QDir(example_path).exists()) {
path=example_path;
}
}
} }
#endif #endif
this->Init(path); this->Init(path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment