Skip to content
Permalink
Browse files

Don't always treat empty long patterns as BB patterns

Due to the wrong condition for GUI handling, empty patterns longer than 1 bar
was treated as BB patterns though they don't really look like.
This commit drops the erroneous check and fixes related GUI issues.
  • Loading branch information...
PhysSong committed Oct 4, 2018
1 parent fb5c8f5 commit 5a921057356c767c42a2a322793178cc4e9293e4
Showing with 3 additions and 6 deletions.
  1. +3 −6 src/tracks/Pattern.cpp
@@ -713,8 +713,7 @@ void PatternView::mousePressEvent( QMouseEvent * _me )
{
if( _me->button() == Qt::LeftButton &&
m_pat->m_patternType == Pattern::BeatPattern &&
( fixedTCOs() || pixelsPerTact() >= 96 ||
m_pat->m_steps != MidiTime::stepsPerTact() ) &&
( fixedTCOs() || pixelsPerTact() >= 96 ) &&
_me->y() > height() - s_stepBtnOff->height() )

// when mouse button is pressed in beat/bassline -mode
@@ -784,8 +783,7 @@ void PatternView::mouseDoubleClickEvent(QMouseEvent *_me)
void PatternView::wheelEvent( QWheelEvent * _we )
{
if( m_pat->m_patternType == Pattern::BeatPattern &&
( fixedTCOs() || pixelsPerTact() >= 96 ||
m_pat->m_steps != MidiTime::stepsPerTact() ) &&
( fixedTCOs() || pixelsPerTact() >= 96 ) &&
_we->y() > height() - s_stepBtnOff->height() )
{
// get the step number that was wheeled on and
@@ -969,8 +967,7 @@ void PatternView::paintEvent( QPaintEvent * )
}

// beat pattern paint event
else if( beatPattern && ( fixedTCOs() || ppt >= 96
|| m_pat->m_steps != MidiTime::stepsPerTact() ) )
else if( beatPattern && ( fixedTCOs() || ppt >= 96 ) )
{
QPixmap stepon0;
QPixmap stepon200;

0 comments on commit 5a92105

Please sign in to comment.
You can’t perform that action at this time.