summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse/muse/arranger/canvas.cpp7
-rw-r--r--muse/muse/wave.cpp10
2 files changed, 13 insertions, 4 deletions
diff --git a/muse/muse/arranger/canvas.cpp b/muse/muse/arranger/canvas.cpp
index a73872b5..ee25d7e2 100644
--- a/muse/muse/arranger/canvas.cpp
+++ b/muse/muse/arranger/canvas.cpp
@@ -869,13 +869,16 @@ void PartCanvas::splitPart(Part* part, const QPoint& p)
void PartCanvas::renamePart(Part* part)
{
+ bool ok;
+
QString s = QInputDialog::getText(this,
tr("MusE: Change Part Name"),
tr("PartName:"),
QLineEdit::Normal,
- part->name()
+ part->name(),
+ &ok
);
- if (s != part->name()) {
+ if (ok && s != part->name()) {
song->startUndo();
Part* newPart = new Part(*part);
newPart->setName(s);
diff --git a/muse/muse/wave.cpp b/muse/muse/wave.cpp
index 44128c2f..9b6fc1d2 100644
--- a/muse/muse/wave.cpp
+++ b/muse/muse/wave.cpp
@@ -61,9 +61,15 @@ static bool copyWaveFileToProject(const QString& path)
QString dst(song->absoluteProjectPath());
QFile dstFile(dst + "/" + srcInfo.fileName());
if (dstFile.exists()) {
- // TODO: rename file, check for identity
+ // TODO: rename file or check for identity
+ // we cannot easily check for identity if destination
+ // file is sample rate converted
+ //
+ // for now we assume that the file has already
+ // be imported:
+ //
printf("File already exists\n");
- return false;
+ return true;
}
SF_INFO sfinfoSrc;