diff options
author | Robert Jonsson <spamatica@gmail.com> | 2013-04-04 19:10:10 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2013-04-04 19:10:10 +0000 |
commit | d930cf81c2cbcc65b373442a2aed3e631d331314 (patch) | |
tree | 84bbfaec2576086debd64d4d1f67e204ea6083cf /muse2/muse | |
parent | 39fdcb8398390cae17bce642b358e74592676bf1 (diff) |
simpledrums pitch and ctrl+arrows
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/arranger/arranger.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/arranger/tlist.cpp | 11 | ||||
-rw-r--r-- | muse2/muse/arranger/tlist.h | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp index e5f22daf..89872bdf 100644 --- a/muse2/muse/arranger/arranger.cpp +++ b/muse2/muse/arranger/arranger.cpp @@ -513,6 +513,8 @@ Arranger::Arranger(ArrangerView* parent, const char* name) connect(canvas, SIGNAL(horizontalScrollNoLimit(unsigned)),hscroll, SLOT(setPosNoLimit(unsigned))); connect(time, SIGNAL(timeChanged(unsigned)), SLOT(setTime(unsigned))); + connect(list, SIGNAL(verticalScrollSetYpos(int)), vscroll, SLOT(setValue(int))); + connect(canvas, SIGNAL(tracklistChanged()), list, SLOT(tracklistChanged())); connect(canvas, SIGNAL(dclickPart(MusECore::Track*)), SIGNAL(editPart(MusECore::Track*))); connect(canvas, SIGNAL(startEditor(MusECore::PartList*,int)), SIGNAL(startEditor(MusECore::PartList*, int))); diff --git a/muse2/muse/arranger/tlist.cpp b/muse2/muse/arranger/tlist.cpp index dbed464e..5cea444d 100644 --- a/muse2/muse/arranger/tlist.cpp +++ b/muse2/muse/arranger/tlist.cpp @@ -1358,6 +1358,16 @@ void TList::moveSelection(int n) (*s)->setSelected(false); selTrack->setSelected(true); + // if selected track is outside of view, enforce scrolling + if (selTrack->y() > this->height()+ypos-20) + { + emit verticalScrollSetYpos(ypos+selTrack->height()); + } + else if (selTrack->y() < ypos) + { + emit verticalScrollSetYpos(selTrack->y()); + } + // rec enable track if expected MusECore::TrackList recd = getRecEnabledTracks(); if (recd.size() == 1 && MusEGlobal::config.moveArmedCheckBox) { // one rec enabled track, move rec enabled with selection @@ -2819,3 +2829,4 @@ void TList::setHeader(Header* h) } } // namespace MusEGui + diff --git a/muse2/muse/arranger/tlist.h b/muse2/muse/arranger/tlist.h index fd05cac9..9201decd 100644 --- a/muse2/muse/arranger/tlist.h +++ b/muse2/muse/arranger/tlist.h @@ -135,6 +135,7 @@ class TList : public QWidget { void selectionChanged(MusECore::Track*); void keyPressExt(QKeyEvent*); void redirectWheelEvent(QWheelEvent*); + void verticalScrollSetYpos(int ypos); public slots: void tracklistChanged(); |