Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Change name of helper method
  • Loading branch information
regulus79 committed Oct 6, 2024
commit a89073b2cdda76f3a3badf1e911ad2afa12a73bb
2 changes: 1 addition & 1 deletion include/AutomationEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ protected slots:
QScrollBar * m_leftRightScroll;
QScrollBar * m_topBottomScroll;

void incrementLeftRightScoll(int value);
void adjustLeftRightScoll(int value);

TimePos m_currentPosition;

Expand Down
2 changes: 1 addition & 1 deletion include/PianoRoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ protected slots:
QScrollBar * m_leftRightScroll;
QScrollBar * m_topBottomScroll;

void incrementLeftRightScoll(int value);
void adjustLeftRightScoll(int value);

TimePos m_currentPosition;
bool m_recording;
Expand Down
2 changes: 1 addition & 1 deletion include/SongEditor.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private slots:

QScrollBar * m_leftRightScroll;

void incrementLeftRightScoll(int value);
void adjustLeftRightScoll(int value);

LcdSpinBox * m_tempoSpinBox;

Expand Down
6 changes: 3 additions & 3 deletions src/gui/editors/AutomationEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ void AutomationEditor::resizeEvent(QResizeEvent * re)
update();
}

void AutomationEditor::incrementLeftRightScoll(int value)
void AutomationEditor::adjustLeftRightScoll(int value)
{
m_leftRightScroll->setValue(m_leftRightScroll->value() -
value * 0.3f / m_zoomXLevels[m_zoomingXModel.value()]);
Expand Down Expand Up @@ -1629,11 +1629,11 @@ void AutomationEditor::wheelEvent(QWheelEvent * we )
// FIXME: Reconsider if determining orientation is necessary in Qt6.
else if(abs(we->angleDelta().x()) > abs(we->angleDelta().y())) // scrolling is horizontal
{
incrementLeftRightScoll(we->angleDelta().x());
adjustLeftRightScoll(we->angleDelta().x());
}
else if(we->modifiers() & Qt::ShiftModifier)
{
incrementLeftRightScoll(we->angleDelta().y());
adjustLeftRightScoll(we->angleDelta().y());
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions src/gui/editors/PianoRoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3743,7 +3743,7 @@ void PianoRoll::resizeEvent(QResizeEvent* re)
}


void PianoRoll::incrementLeftRightScoll(int value)
void PianoRoll::adjustLeftRightScoll(int value)
{
m_leftRightScroll->setValue(m_leftRightScroll->value() -
value * 0.3f / m_zoomLevels[m_zoomingModel.value()]);
Expand Down Expand Up @@ -3881,11 +3881,11 @@ void PianoRoll::wheelEvent(QWheelEvent * we )
// FIXME: Reconsider if determining orientation is necessary in Qt6.
else if(abs(we->angleDelta().x()) > abs(we->angleDelta().y())) // scrolling is horizontal
{
incrementLeftRightScoll(we->angleDelta().x());
adjustLeftRightScoll(we->angleDelta().x());
}
else if(we->modifiers() & Qt::ShiftModifier)
{
incrementLeftRightScoll(we->angleDelta().y());
adjustLeftRightScoll(we->angleDelta().y());
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions src/gui/editors/SongEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ void SongEditor::keyPressEvent( QKeyEvent * ke )



void SongEditor::incrementLeftRightScoll(int value)
void SongEditor::adjustLeftRightScoll(int value)
{
m_leftRightScroll->setValue(m_leftRightScroll->value()
- value * DEFAULT_PIXELS_PER_BAR / pixelsPerBar());
Expand Down Expand Up @@ -550,11 +550,11 @@ void SongEditor::wheelEvent( QWheelEvent * we )
// FIXME: Reconsider if determining orientation is necessary in Qt6.
else if (std::abs(we->angleDelta().x()) > std::abs(we->angleDelta().y())) // scrolling is horizontal
{
incrementLeftRightScoll(we->angleDelta().x());
adjustLeftRightScoll(we->angleDelta().x());
}
else if (we->modifiers() & Qt::ShiftModifier)
{
incrementLeftRightScoll(we->angleDelta().y());
adjustLeftRightScoll(we->angleDelta().y());
}
else
{
Expand Down