mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-14 12:08:33 -04:00
Merge pull request #1563 from DanWin/resize-cursor
Don't display resize cursor for non-resizable TCOs
This commit is contained in:
@@ -248,7 +248,6 @@ TrackContentObjectView::TrackContentObjectView( TrackContentObject * _tco,
|
||||
m_tco( _tco ),
|
||||
m_trackView( _tv ),
|
||||
m_action( NoAction ),
|
||||
m_autoResize( false ),
|
||||
m_initialMousePos( QPoint( 0, 0 ) ),
|
||||
m_initialMouseGlobalPos( QPoint( 0, 0 ) ),
|
||||
m_hint( NULL ),
|
||||
@@ -656,7 +655,7 @@ void TrackContentObjectView::mousePressEvent( QMouseEvent * _me )
|
||||
"a copy." ),
|
||||
embed::getIconPixmap( "hint" ), 0 );
|
||||
}
|
||||
else if( m_autoResize == false )
|
||||
else if( !m_tco->getAutoResize() )
|
||||
{
|
||||
m_action = Resize;
|
||||
m_oldTime = m_tco->length();
|
||||
@@ -846,7 +845,7 @@ void TrackContentObjectView::mouseMoveEvent( QMouseEvent * _me )
|
||||
}
|
||||
else
|
||||
{
|
||||
if( _me->x() > width() - RESIZE_GRIP_WIDTH && !_me->buttons() )
|
||||
if( _me->x() > width() - RESIZE_GRIP_WIDTH && !_me->buttons() && !m_tco->getAutoResize() )
|
||||
{
|
||||
if( QApplication::overrideCursor() != NULL &&
|
||||
QApplication::overrideCursor()->shape() !=
|
||||
@@ -957,19 +956,6 @@ float TrackContentObjectView::pixelsPerTact()
|
||||
|
||||
|
||||
|
||||
/*! \brief Set whether this trackContentObjectView can resize.
|
||||
*
|
||||
* \param _e The boolean state of whether this track content object view
|
||||
* is allowed to resize.
|
||||
*/
|
||||
void TrackContentObjectView::setAutoResizeEnabled( bool _e )
|
||||
{
|
||||
m_autoResize = _e;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*! \brief Detect whether the mouse moved more than n pixels on screen.
|
||||
*
|
||||
* \param _me The QMouseEvent.
|
||||
|
||||
Reference in New Issue
Block a user