summaryrefslogtreecommitdiff
path: root/muse2/muse/widgets
diff options
context:
space:
mode:
authorFlorian Jung <flo@windfisch.org>2013-09-18 23:54:35 +0200
committerFlorian Jung <flo@windfisch.org>2013-09-18 23:54:35 +0200
commitb3fc353a09496ee0aea7099d72e6963f4c2fc774 (patch)
tree83ab91e988c59076d81ebddc09e8ff274dee8af5 /muse2/muse/widgets
parent48a93993cfce160fb7d4cf0b67b4b77e22db19e5 (diff)
parent85a51421d44f3893a1010f77e0418caf6be70235 (diff)
Merge branch 'audiomsg_overhaul' (nonshared eventlists and more)
This introduces the following changes: - Clone Parts no more share their eventlist. Instead, all changes made to one clone are replicated to the other clones' eventlists - audio/song->msg{Add,Delete,Change}{Part,Event,Track} have been replaced by the corresponding UndoOp operations. - Enforcing of const-correctness: No GUI code may ever gain writable access to audio/midi/song data structures. Access must *always* go through applyOperationGroup. This is now enforced. - Removed a bunch of DELETETHIS or REMOVE or otherwise commented out code - Removed dead code - Removed unused Audio Messages (that should go through applyOpGroup anyway.)
Diffstat (limited to 'muse2/muse/widgets')
-rw-r--r--muse2/muse/widgets/mtrackinfo.cpp12
-rw-r--r--muse2/muse/widgets/utils.cpp4
2 files changed, 2 insertions, 14 deletions
diff --git a/muse2/muse/widgets/mtrackinfo.cpp b/muse2/muse/widgets/mtrackinfo.cpp
index 09d45577..a73eb212 100644
--- a/muse2/muse/widgets/mtrackinfo.cpp
+++ b/muse2/muse/widgets/mtrackinfo.cpp
@@ -682,18 +682,11 @@ void MidiTrackInfo::iOutputChannelChanged(int channel)
MusECore::MidiTrack* track = (MusECore::MidiTrack*)selected;
if (channel != track->outChannel()) {
++_blockHeartbeatCount;
- // Changed by T356.
- //track->setOutChannel(channel);
MusEGlobal::audio->msgIdle(true);
- //audio->msgSetTrackOutChannel(track, channel);
track->setOutChanAndUpdate(channel);
MusEGlobal::audio->msgIdle(false);
- // may result in adding/removing mixer strip:
- //MusEGlobal::song->update(-1);
- //MusEGlobal::song->update(SC_MIDI_TRACK_PROP);
MusEGlobal::audio->msgUpdateSoloStates(); // p4.0.14
- //MusEGlobal::song->update(SC_MIDI_TRACK_PROP | SC_ROUTE); //
MusEGlobal::song->update(SC_MIDI_TRACK_PROP); //
--_blockHeartbeatCount;
}
@@ -714,16 +707,11 @@ void MidiTrackInfo::iOutputPortChanged(int index)
if (port_num == track->outPort())
return;
++_blockHeartbeatCount;
- // Changed by T356.
- //track->setOutPort(port_num);
MusEGlobal::audio->msgIdle(true);
- //audio->msgSetTrackOutPort(track, port_num);
track->setOutPortAndUpdate(port_num);
MusEGlobal::audio->msgIdle(false);
- //MusEGlobal::song->update(SC_MIDI_TRACK_PROP);
MusEGlobal::audio->msgUpdateSoloStates(); // p4.0.14
- //MusEGlobal::song->update(SC_MIDI_TRACK_PROP | SC_ROUTE); //
MusEGlobal::song->update(SC_MIDI_TRACK_PROP); //
--_blockHeartbeatCount;
}
diff --git a/muse2/muse/widgets/utils.cpp b/muse2/muse/widgets/utils.cpp
index ab1d74fd..687c76e4 100644
--- a/muse2/muse/widgets/utils.cpp
+++ b/muse2/muse/widgets/utils.cpp
@@ -532,7 +532,7 @@ int get_paste_len()
if (tag == "part")
{
Part* p = 0;
- p = readXmlPart(xml, NULL, false, false);
+ p = Part::readFromXml(xml, NULL, false, false);
if (p)
{
@@ -542,7 +542,7 @@ int get_paste_len()
if (p->endTick() > end_tick)
end_tick=p->endTick();
- unchainClone(p);
+ p->unchainClone(); // just for safety; shouldn't be chained anyway.
delete p;
}
}