diff --git a/include/Clip.h b/include/Clip.h index 14595263e..204a071a7 100644 --- a/include/Clip.h +++ b/include/Clip.h @@ -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; diff --git a/src/gui/clips/ClipView.cpp b/src/gui/clips/ClipView.cpp index 0f362c58d..e41431314 100644 --- a/src/gui/clips/ClipView.cpp +++ b/src/gui/clips/ClipView.cpp @@ -504,13 +504,13 @@ void ClipView::updateCursor(QMouseEvent * me) SampleClip * sClip = dynamic_cast(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 \ No newline at end of file +} // namespace lmms::gui