Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 635efd8e authored by Jason Wood's avatar Jason Wood

mousePressed/mouseRelease did not return a value even though they were...

mousePressed/mouseRelease did not return a value even though they were supposed to. Fixing this fixed issues with resizing clips not always working.

svn path=/trunk/kdenlive/; revision=320
parent adb8f24c
......@@ -67,6 +67,8 @@ QCursor TrackPanelClipResizeFunction::getMouseCursor(QMouseEvent *event)
bool TrackPanelClipResizeFunction::mousePressed(QMouseEvent *event)
{
bool result = false;
GenTime mouseTime(m_timeline->mapLocalToValue(event->x()), m_docTrack->document()->framesPerSecond());
m_clipUnderMouse = m_docTrack->getClipAt(mouseTime);
if(m_clipUnderMouse) {
......@@ -97,14 +99,24 @@ bool TrackPanelClipResizeFunction::mousePressed(QMouseEvent *event)
}
m_snapToGrid.setCursorTimes(cursor);
m_resizeCommand = new Command::KResizeCommand(m_docTrack->document(), m_clipUnderMouse);
result = true;
}
return result;
}
bool TrackPanelClipResizeFunction::mouseReleased(QMouseEvent *event)
{
bool result = false;
m_resizeCommand->setEndSize(m_clipUnderMouse);
m_timeline->addCommand(m_resizeCommand, false);
m_docTrack->document()->indirectlyModified();
m_resizeCommand = 0;
result = true;
return result;
}
bool TrackPanelClipResizeFunction::mouseMoved(QMouseEvent *event)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment