Skip to content

Commit

Permalink
Don't always treat empty long patterns as BB patterns
Browse files Browse the repository at this point in the history
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 8, 2018
1 parent fb5c8f5 commit 5a92105
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/tracks/Pattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 5a92105

Please sign in to comment.