summaryrefslogtreecommitdiff
path: root/muse2/muse/app.cpp
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2012-12-18 16:19:29 +0000
committerRobert Jonsson <spamatica@gmail.com>2012-12-18 16:19:29 +0000
commita227872303382ecb2020e4408525f0b25f41e88d (patch)
tree99b9971aeec5ea71427829f24f83f9aacbeeb3db /muse2/muse/app.cpp
parenta2ae7e06099f1ceb38d752909e3c17055fbc59ca (diff)
fluidsynth and simpledrums search project folder for missing sounds
Diffstat (limited to 'muse2/muse/app.cpp')
-rw-r--r--muse2/muse/app.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index 45492889..82bf56af 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -1145,11 +1145,13 @@ void MusE::loadProjectFile1(const QString& name, bool songTemplate, bool doReadM
}
project.setFile(MusEGui::getUniqueUntitledName());
MusEGlobal::museProject = MusEGlobal::museProjectInitPath;
+ QDir::setCurrent(QDir::homePath());
}
else {
printf("Setting project path to %s\n", fi.absolutePath().toLatin1().constData());
MusEGlobal::museProject = fi.absolutePath();
project.setFile(name);
+ QDir::setCurrent(MusEGlobal::museProject);
}
QString ex = fi.completeSuffix().toLower();
QString mex = ex.section('.', -1, -1);
@@ -1298,7 +1300,8 @@ void MusE::setUntitledProject()
{
setConfigDefaults();
QString name(MusEGui::getUniqueUntitledName());
- MusEGlobal::museProject = "./";
+ MusEGlobal::museProject = MusEGlobal::museProjectInitPath;
+ QDir::setCurrent(QDir::homePath());
project.setFile(name);
setWindowTitle(tr("MusE: Song: %1").arg(MusEGui::projectTitleFromFilename(name)));
writeTopwinState=true;
@@ -1338,6 +1341,7 @@ void MusE::loadProject()
tr("MusE: load project"), &doReadMidiPorts);
if (!fn.isEmpty()) {
MusEGlobal::museProject = QFileInfo(fn).absolutePath();
+ QDir::setCurrent(QFileInfo(fn).absolutePath());
loadProjectFile(fn, false, doReadMidiPorts);
}
}
@@ -1711,6 +1715,8 @@ bool MusE::saveAs()
}
else
MusEGlobal::museProject = tempOldProj;
+
+ QDir::setCurrent(MusEGlobal::museProject);
}
return ok;
@@ -2624,6 +2630,7 @@ MusE::lash_idle_cb ()
setWindowTitle(tr("MusE: Song: %1").arg(MusEGui::projectTitleFromFilename(project.absoluteFilePath())));
addProject(ss.toAscii());
MusEGlobal::museProject = QFileInfo(ss.toAscii()).absolutePath();
+ QDir::setCurrent(MusEGlobal::museProject);
}
lash_send_event (lash_client, event);
}