From 42126f3b398802eb24c8d9acd2591ef4dbe7257d Mon Sep 17 00:00:00 2001 From: Florian Jung Date: Mon, 21 Nov 2011 18:02:02 +0000 Subject: added feature: super-glue --- muse2/muse/arranger/pcanvas.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'muse2/muse/arranger/pcanvas.cpp') 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:") + -- cgit v1.2.3