changed modifier detection from mainWindow::isCtrlPressed etc to Qt framework detection. Fixes a bunch of little glitches and enables horizontal scroll wheels (stable backport)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.4@1949 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -334,7 +334,7 @@ void timeLine::mouseMoveEvent( QMouseEvent * _me )
|
||||
case MoveLoopEnd:
|
||||
{
|
||||
const Uint8 i = m_action - MoveLoopBegin;
|
||||
if( engine::getMainWindow()->isCtrlPressed() == TRUE )
|
||||
if( _me->modifiers() & Qt::ControlModifier )
|
||||
{
|
||||
// no ctrl-press-hint when having ctrl pressed
|
||||
delete m_hint;
|
||||
|
||||
@@ -144,7 +144,7 @@ void automatableModelView::setModel( model * _model, bool _old_model_valid )
|
||||
void automatableModelView::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( _me->button() == Qt::LeftButton &&
|
||||
engine::getMainWindow()->isCtrlPressed() == TRUE )
|
||||
_me->modifiers() & Qt::ControlModifier )
|
||||
{
|
||||
new stringPairDrag( "automatable_model",
|
||||
QString::number( modelUntyped()->id() ),
|
||||
|
||||
@@ -745,7 +745,7 @@ void automationEditor::mousePressEvent( QMouseEvent * _me )
|
||||
m_editMode == DRAW )
|
||||
{
|
||||
// Connect the dots
|
||||
if( engine::getMainWindow()->isShiftPressed() )
|
||||
if( _me->modifiers() & Qt::ShiftModifier )
|
||||
{
|
||||
drawLine( m_drawLastTick,
|
||||
m_drawLastLevel,
|
||||
@@ -1612,7 +1612,7 @@ void automationEditor::resizeEvent( QResizeEvent * )
|
||||
void automationEditor::wheelEvent( QWheelEvent * _we )
|
||||
{
|
||||
_we->accept();
|
||||
if( engine::getMainWindow()->isCtrlPressed() == TRUE )
|
||||
if( _we->modifiers() & Qt::ControlModifier )
|
||||
{
|
||||
if( _we->delta() > 0 )
|
||||
{
|
||||
@@ -1632,7 +1632,8 @@ void automationEditor::wheelEvent( QWheelEvent * _we )
|
||||
m_timeLine->setPixelsPerTact( m_ppt );
|
||||
update();
|
||||
}
|
||||
else if( engine::getMainWindow()->isShiftPressed() )
|
||||
else if( _we->modifiers() & Qt::ShiftModifier
|
||||
|| _we->orientation() == Qt::Horizontal )
|
||||
{
|
||||
m_leftRightScroll->setValue( m_leftRightScroll->value() -
|
||||
_we->delta() * 2 / 15 );
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -115,7 +115,7 @@ void automatableButton::contextMenuEvent( QContextMenuEvent * _me )
|
||||
void automatableButton::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( _me->button() == Qt::LeftButton &&
|
||||
engine::getMainWindow()->isCtrlPressed() == FALSE )
|
||||
! ( _me->modifiers() & Qt::ControlModifier ) )
|
||||
{
|
||||
if( isCheckable() )
|
||||
{
|
||||
|
||||
@@ -76,7 +76,7 @@ void automatableSlider::contextMenuEvent( QContextMenuEvent * _me )
|
||||
void automatableSlider::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( _me->button() == Qt::LeftButton &&
|
||||
engine::getMainWindow()->isCtrlPressed() == FALSE )
|
||||
! ( _me->modifiers() & Qt::ControlModifier ) )
|
||||
{
|
||||
m_showStatus = TRUE;
|
||||
QSlider::mousePressEvent( _me );
|
||||
|
||||
@@ -114,7 +114,7 @@ void comboBox::contextMenuEvent( QContextMenuEvent * _me )
|
||||
void comboBox::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( _me->button() == Qt::LeftButton &&
|
||||
engine::getMainWindow()->isCtrlPressed() == FALSE )
|
||||
! ( _me->modifiers() & Qt::ControlModifier ) )
|
||||
{
|
||||
if( _me->x() > width() - CB_ARROW_BTN_WIDTH )
|
||||
{
|
||||
|
||||
@@ -112,7 +112,7 @@ void fader::mouseMoveEvent( QMouseEvent *ev )
|
||||
void fader::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( _me->button() == Qt::LeftButton &&
|
||||
engine::getMainWindow()->isCtrlPressed() == FALSE )
|
||||
! ( _me->modifiers() & Qt::ControlModifier ) )
|
||||
{
|
||||
mouseMoveEvent( _me );
|
||||
_me->accept();
|
||||
|
||||
@@ -439,8 +439,8 @@ void knob::dropEvent( QDropEvent * _de )
|
||||
void knob::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( _me->button() == Qt::LeftButton &&
|
||||
engine::getMainWindow()->isCtrlPressed() == FALSE &&
|
||||
engine::getMainWindow()->isShiftPressed() == FALSE )
|
||||
! ( _me->modifiers() & Qt::ControlModifier ) &&
|
||||
! ( _me->modifiers() & Qt::ShiftModifier ) )
|
||||
{
|
||||
model()->prepareJournalEntryFromOldVal();
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ void lcdSpinBox::contextMenuEvent( QContextMenuEvent * _me )
|
||||
void lcdSpinBox::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( _me->button() == Qt::LeftButton &&
|
||||
engine::getMainWindow()->isCtrlPressed() == false &&
|
||||
! ( _me->modifiers() & Qt::ControlModifier ) &&
|
||||
_me->y() < m_cellHeight + 2 )
|
||||
{
|
||||
m_origMousePos = _me->globalPos();
|
||||
|
||||
@@ -297,8 +297,8 @@ void sampleTCOView::dropEvent( QDropEvent * _de )
|
||||
void sampleTCOView::mousePressEvent( QMouseEvent * _me )
|
||||
{
|
||||
if( _me->button() == Qt::LeftButton &&
|
||||
engine::getMainWindow()->isCtrlPressed() &&
|
||||
engine::getMainWindow()->isShiftPressed() )
|
||||
_me->modifiers() & Qt::ControlModifier &&
|
||||
_me->modifiers() & Qt::ShiftModifier )
|
||||
{
|
||||
m_tco->toggleRecord();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user