Skip to content

Commit 5a92105

Browse files
committed
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.
1 parent fb5c8f5 commit 5a92105

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/tracks/Pattern.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,7 @@ void PatternView::mousePressEvent( QMouseEvent * _me )
713713
{
714714
if( _me->button() == Qt::LeftButton &&
715715
m_pat->m_patternType == Pattern::BeatPattern &&
716-
( fixedTCOs() || pixelsPerTact() >= 96 ||
717-
m_pat->m_steps != MidiTime::stepsPerTact() ) &&
716+
( fixedTCOs() || pixelsPerTact() >= 96 ) &&
718717
_me->y() > height() - s_stepBtnOff->height() )
719718

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

971969
// beat pattern paint event
972-
else if( beatPattern && ( fixedTCOs() || ppt >= 96
973-
|| m_pat->m_steps != MidiTime::stepsPerTact() ) )
970+
else if( beatPattern && ( fixedTCOs() || ppt >= 96 ) )
974971
{
975972
QPixmap stepon0;
976973
QPixmap stepon200;

0 commit comments

Comments
 (0)