diff options
author | Florian Jung <flo@windfisch.org> | 2012-05-28 14:15:52 +0000 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2012-05-28 14:15:52 +0000 |
commit | d2a88cfaad5ac385fc3c6212c09ad7fbc38e9454 (patch) | |
tree | 387da0b38255003e1a971629ea0de32273ac3d3c /muse2/muse/waveedit | |
parent | 716f5a5b56a3b7ff59004ef0a1af5f98cb2a691c (diff) |
merged with release_2_0
Diffstat (limited to 'muse2/muse/waveedit')
-rw-r--r-- | muse2/muse/waveedit/waveedit.cpp | 15 | ||||
-rw-r--r-- | muse2/muse/waveedit/waveedit.h | 3 | ||||
-rw-r--r-- | muse2/muse/waveedit/waveview.cpp | 13 |
3 files changed, 20 insertions, 11 deletions
diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp index 6cad9871..dd7c4524 100644 --- a/muse2/muse/waveedit/waveedit.cpp +++ b/muse2/muse/waveedit/waveedit.cpp @@ -281,7 +281,7 @@ WaveEdit::WaveEdit(MusECore::PartList* pl) } initTopwinState(); - MusEGlobal::muse->topwinMenuInited(this); + finalizeInit(); } void WaveEdit::initShortcuts() @@ -532,4 +532,17 @@ void WaveEdit::horizontalZoomOut() } +//--------------------------------------------------------- +// focusCanvas +//--------------------------------------------------------- + +void WaveEdit::focusCanvas() +{ + if(MusEGlobal::config.smartFocus) + { + view->setFocus(); + view->activateWindow(); + } +} + } // namespace MusEGui diff --git a/muse2/muse/waveedit/waveedit.h b/muse2/muse/waveedit/waveedit.h index d0ec7a26..b2617f49 100644 --- a/muse2/muse/waveedit/waveedit.h +++ b/muse2/muse/waveedit/waveedit.h @@ -86,11 +86,10 @@ class WaveEdit : public MidiEditor { public slots: void configChanged(); - virtual void updateHScrollRange(); void horizontalZoomIn(); void horizontalZoomOut(); - + void focusCanvas(); signals: void isDeleting(MusEGui::TopWin*); diff --git a/muse2/muse/waveedit/waveview.cpp b/muse2/muse/waveedit/waveview.cpp index 04751428..c585ba4b 100644 --- a/muse2/muse/waveedit/waveview.cpp +++ b/muse2/muse/waveedit/waveview.cpp @@ -21,7 +21,7 @@ //========================================================= #include <stdio.h> -#include <values.h> +#include <limits.h> #include <sys/wait.h> #include <QPainter> @@ -221,8 +221,6 @@ void WaveView::draw(QPainter& p, const QRect& r) if (pos[2] >= x && pos[2] < x2) p.drawLine(pos[2], y, pos[2], y2); - // Changed by T356. Support multiple (or none) selected parts. - //int n = curPart->track()->channels(); int n = 1; if(curPart) n = curPart->track()->channels(); @@ -245,9 +243,6 @@ void WaveView::draw(QPainter& p, const QRect& r) QString WaveView::getCaption() const { - - // Changed by T356. Support multiple (or none) selected parts. - //return QString("Part ") + curPart->name(); if(curPart) return QString("Part ") + curPart->name(); else @@ -265,8 +260,10 @@ void WaveView::songChanged(int flags) if(flags == SC_MIDI_CONTROLLER) return; - if (flags & SC_SELECTION) { - startSample = MAXINT; + if (flags & ~SC_SELECTION) { + // TODO FIXME: don't we actually only want SC_PART_*, and maybe SC_TRACK_DELETED? + // (same in ecanvas.cpp) + startSample = INT_MAX; endSample = 0; curPart = 0; for (MusECore::iPart p = editor->parts()->begin(); p != editor->parts()->end(); ++p) { |