diff options
author | Robert Jonsson <spamatica@gmail.com> | 2011-10-14 19:07:15 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2011-10-14 19:07:15 +0000 |
commit | 7249c6fb8513867e13dd6a69ebb51648e734204e (patch) | |
tree | f8246988708b27394ce683bb01404ec80006e504 /muse2 | |
parent | 395eb053ed2cd2ba1a47bf3fe99fe65ace523cad (diff) |
keyboard navigation for tracks
Diffstat (limited to 'muse2')
-rw-r--r-- | muse2/ChangeLog | 2 | ||||
-rw-r--r-- | muse2/muse/arranger/tlist.cpp | 13 | ||||
-rw-r--r-- | muse2/muse/track.cpp | 28 | ||||
-rw-r--r-- | muse2/muse/track.h | 1 |
4 files changed, 41 insertions, 3 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 506f3629..d601817e 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,3 +1,5 @@ +14.10.2011: + - Fixed keyboard navigation in tracks to work with hidden tracks (rj) 12.10.2011: - Made the plugins aware of namespaces. (Orcan) 11.10.2011: diff --git a/muse2/muse/arranger/tlist.cpp b/muse2/muse/arranger/tlist.cpp index cca8a086..1e3ad419 100644 --- a/muse2/muse/arranger/tlist.cpp +++ b/muse2/muse/arranger/tlist.cpp @@ -579,7 +579,6 @@ void TList::mouseDoubleClickEvent(QMouseEvent* ev) //--------------------------------------------------------- // portsPopupMenu //--------------------------------------------------------- - void TList::portsPopupMenu(MusECore::Track* t, int x, int y) { switch(t->type()) { @@ -886,16 +885,24 @@ void TList::moveSelection(int n) if (t == tracks->end()) { --t; break; - } } - } + // skip over hidden tracks + if (!(*t)->isVisible()) { + n++; + } + } + } else { while (n++ != 0) { if (t == tracks->begin()) break; --t; + // skip over hidden tracks + if (!(*t)->isVisible()) { + n--; } } + } (*s)->setSelected(false); (*t)->setSelected(true); diff --git a/muse2/muse/track.cpp b/muse2/muse/track.cpp index 6fbe81c5..1ee1dfde 100644 --- a/muse2/muse/track.cpp +++ b/muse2/muse/track.cpp @@ -144,6 +144,34 @@ void removePortCtrlEvents(MidiTrack* t) } } +//--------------------------------------------------------- +// isVisible +//--------------------------------------------------------- +bool Track::isVisible() +{ + switch (type()) + { + case Track::AUDIO_AUX: + return AudioAux::visible(); + break; + case Track::AUDIO_GROUP: + return AudioGroup::visible(); + case Track::AUDIO_INPUT: + return AudioInput::visible(); + case Track::AUDIO_OUTPUT: + return AudioOutput::visible(); + case Track::WAVE: + return WaveTrack::visible(); + case Track::MIDI: + return MidiTrack::visible(); + case Track::AUDIO_SOFTSYNTH: + return AudioAux::visible(); + default: + break; + } + + return false; +} //--------------------------------------------------------- diff --git a/muse2/muse/track.h b/muse2/muse/track.h index 46dfc59f..25a846ac 100644 --- a/muse2/muse/track.h +++ b/muse2/muse/track.h @@ -205,6 +205,7 @@ class Track { virtual AutomationType automationType() const = 0; virtual void setAutomationType(AutomationType t) = 0; static void setVisible(bool ) { } + bool isVisible(); }; |