summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog2
-rw-r--r--muse2/muse/arranger/tlist.cpp13
-rw-r--r--muse2/muse/track.cpp28
-rw-r--r--muse2/muse/track.h1
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();
};