summaryrefslogtreecommitdiff
path: root/muse2/muse/song.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2011-09-13 13:35:43 +0000
committerFlorian Jung <flo@windfisch.org>2011-09-13 13:35:43 +0000
commitfb0fbe8f65cca18487567fd1e2db63c99c024bd8 (patch)
treec4bb5ca77253af44bd00c4c2912773c42818478c /muse2/muse/song.cpp
parent253b9d9f1a17b98f3f6696f456e9d83f1ac9aee3 (diff)
when splitting or pasting into new parts, the new newly created parts
are automatically added to all editors which also display the "origin" parts
Diffstat (limited to 'muse2/muse/song.cpp')
-rw-r--r--muse2/muse/song.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp
index e5381884..af5b0489 100644
--- a/muse2/muse/song.cpp
+++ b/muse2/muse/song.cpp
@@ -3927,3 +3927,26 @@ QString Song::getScriptPath(int id, bool isdelivered)
return path;
}
+void Song::informAboutNewParts(const std::map< Part*, std::set<Part*> >& param)
+{
+ emit newPartsCreated(param);
+}
+
+void Song::informAboutNewParts(Part* orig, Part* p1, Part* p2, Part* p3, Part* p4, Part* p5, Part* p6, Part* p7, Part* p8, Part* p9)
+{
+ std::map< Part*, std::set<Part*> > temp;
+
+ temp[orig].insert(p1);
+ temp[orig].insert(p2);
+ temp[orig].insert(p3);
+ temp[orig].insert(p4);
+ temp[orig].insert(p5);
+ temp[orig].insert(p6);
+ temp[orig].insert(p7);
+ temp[orig].insert(p8);
+ temp[orig].insert(p9);
+ temp[orig].erase(static_cast<Part*>(NULL));
+ temp[orig].erase(orig);
+
+ informAboutNewParts(temp);
+}