Fix wrong cursor for selected resizeable clips in song editor (#5996)
Fixes #879.
This commit is contained in:
@@ -93,6 +93,12 @@ public:
|
||||
return m_length;
|
||||
}
|
||||
|
||||
/*! \brief Specify whether or not a TCO automatically resizes.
|
||||
*
|
||||
* If a TCO does automatically resize, it cannot be manually
|
||||
* resized by clicking and dragging its edge.
|
||||
*
|
||||
*/
|
||||
inline void setAutoResize( const bool r )
|
||||
{
|
||||
m_autoResize = r;
|
||||
|
||||
@@ -504,13 +504,13 @@ void ClipView::updateCursor(QMouseEvent * me)
|
||||
SampleClip * sClip = dynamic_cast<SampleClip*>(m_clip);
|
||||
|
||||
// If we are at the edges, use the resize cursor
|
||||
if ((me->x() > width() - RESIZE_GRIP_WIDTH && !me->buttons() && !m_clip->getAutoResize())
|
||||
|| (me->x() < RESIZE_GRIP_WIDTH && !me->buttons() && sClip && !m_clip->getAutoResize()))
|
||||
if (!me->buttons() && !m_clip->getAutoResize() && !isSelected()
|
||||
&& ((me->x() > width() - RESIZE_GRIP_WIDTH) || (me->x() < RESIZE_GRIP_WIDTH && sClip)))
|
||||
{
|
||||
setCursor(Qt::SizeHorCursor);
|
||||
}
|
||||
// If we are in the middle on knife mode, use the knife cursor
|
||||
else if (sClip && m_trackView->trackContainerView()->knifeMode())
|
||||
else if (sClip && m_trackView->trackContainerView()->knifeMode() && !isSelected())
|
||||
{
|
||||
setCursor(m_cursorKnife);
|
||||
}
|
||||
@@ -1507,4 +1507,4 @@ QColor ClipView::getColorForDisplay( QColor defaultColor )
|
||||
}
|
||||
|
||||
|
||||
} // namespace lmms::gui
|
||||
} // namespace lmms::gui
|
||||
|
||||
Reference in New Issue
Block a user