summaryrefslogtreecommitdiff
path: root/muse2/muse/arranger/pcanvas.cpp
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2011-03-05 20:32:44 +0000
committerRobert Jonsson <spamatica@gmail.com>2011-03-05 20:32:44 +0000
commit03b22522651de83a45494a2745f05b7a19ecb3d7 (patch)
treecba211d87226e907aaf73b509246c310b4741920 /muse2/muse/arranger/pcanvas.cpp
parent1f615170b3519ca56951fbdd7cd86ef5f35817cc (diff)
tweaks here and tweaks there
Diffstat (limited to 'muse2/muse/arranger/pcanvas.cpp')
-rw-r--r--muse2/muse/arranger/pcanvas.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp
index 43045987..0317d99e 100644
--- a/muse2/muse/arranger/pcanvas.cpp
+++ b/muse2/muse/arranger/pcanvas.cpp
@@ -1203,7 +1203,6 @@ void PartCanvas::keyPress(QKeyEvent* event)
emit selectTrackBelow();
return;
}
-
//
// Shortcuts that require selected parts from here
//
@@ -2880,6 +2879,8 @@ void PartCanvas::drawCanvas(QPainter& p, const QRect& rect)
break;
Track* track = *it;
th = track->height();
+ if (!th)
+ continue;
///if (/*config.canvasShowGrid ||*/ !track->isMidiTrack()) {
if (config.canvasShowGrid && (track->isMidiTrack() || track->type() == Track::WAVE)) // Tim.
{
@@ -2925,6 +2926,8 @@ void PartCanvas::drawTopItem(QPainter& p, const QRect& rect)
break;
Track* track = *it;
th = track->height();
+ if (!th)
+ continue;
if (!track->isMidiTrack()) { // draw automation
QRect r = rect & QRect(x, yy, w, track->height());
drawAutomation(p, r, (AudioTrack*)track);