summaryrefslogtreecommitdiff
path: root/muse2/muse/arranger/pcanvas.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-11-21 18:02:02 +0000
committerFlorian Jung <flo@windfisch.org>2011-11-21 18:02:02 +0000
commit42126f3b398802eb24c8d9acd2591ef4dbe7257d (patch)
tree8701d4248cdb67f3498f135075f95f02f071cda8 /muse2/muse/arranger/pcanvas.cpp
parent18b937ad500199bc872b61c6d4df418e927a02a4 (diff)
added feature: super-glue
Diffstat (limited to 'muse2/muse/arranger/pcanvas.cpp')
-rw-r--r--muse2/muse/arranger/pcanvas.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp
index 366766ae..d19fa082 100644
--- a/muse2/muse/arranger/pcanvas.cpp
+++ b/muse2/muse/arranger/pcanvas.cpp
@@ -54,6 +54,7 @@
#include "shortcuts.h"
#include "gconfig.h"
#include "app.h"
+#include "functions.h"
#include "filedialog.h"
#include "marker/marker.h"
#include "mpevent.h"
@@ -664,6 +665,8 @@ QMenu* PartCanvas::genItemPopup(CItem* item)
act_split->setData(2);
QAction *act_glue = partPopup->addAction(QIcon(*glueIcon), tr("glue"));
act_glue->setData(3);
+ QAction *act_superglue = partPopup->addAction(QIcon(*glueIcon), tr("super glue (merge selection)"));
+ act_superglue->setData(6);
QAction *act_declone = partPopup->addAction(tr("de-clone"));
act_declone->setData(15);
@@ -752,6 +755,9 @@ void PartCanvas::itemPopup(CItem* item, int n, const QPoint& pt)
case 5:
copy(pl);
break;
+ case 6:
+ MusECore::merge_selected_parts();
+ break;
case 14: // wave edit
emit startEditor(pl, 4);
@@ -772,7 +778,7 @@ void PartCanvas::itemPopup(CItem* item, int n, const QPoint& pt)
// Indicate undo, and do port controller values but not clone parts.
// changed by flo93: removed start and endUndo, instead changed first bool to true
MusEGlobal::audio->msgChangePart(spart, dpart, true, true, false);
- break; // Has to be break here, right?
+ break;
}
case 16: // Export to file
{
@@ -800,7 +806,7 @@ void PartCanvas::itemPopup(CItem* item, int n, const QPoint& pt)
for (MusECore::iEvent e = el->begin(); e != el->end(); ++e)
{
MusECore::Event event = e->second;
- MusECore::SndFileR f = event.sndFile();
+ MusECore::SndFileR f = event.sndFile();
if (f.isNull())
continue;
str.append(QString("\n@") + QString().setNum(event.tick()) + QString(" len:") +