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

Don't allow clip zone beyond clip duration. Fixes #68

parent 9564b14c
......@@ -837,19 +837,9 @@ bool ProjectClip::isReady() const
return m_clipStatus == StatusReady;
}
/*void ProjectClip::setZone(const QPoint &zone)
{
m_zone = zone;
}*/
QPoint ProjectClip::zone() const
{
int x = getProducerIntProperty(QStringLiteral("kdenlive:zone_in"));
int y = getProducerIntProperty(QStringLiteral("kdenlive:zone_out"));
if (y <= x) {
y = getFramePlaytime();
}
return QPoint(x, y);
return ClipController::zone();
}
const QString ProjectClip::hash()
......
......@@ -171,7 +171,7 @@ Rectangle {
drag.axis: Drag.XAxis
drag.smoothed: false
drag.minimumX: 0
drag.maximumX: ruler.width
drag.maximumX: ruler.width - trimOut.width
onPositionChanged: {
if (mouse.buttons === Qt.LeftButton) {
controller.zoneOut = Math.round((trimOut.x + trimOut.width) / root.timeScale)
......
......@@ -149,7 +149,7 @@ bool ClipModel::requestResize(int size, bool right, Fun &undo, Fun &redo, bool l
if (!right && in + delta < 0 && !m_endlessResize) {
return false;
}
if (!m_endlessResize && right && out - delta >= m_producer->get_length()) {
if (!m_endlessResize && right && (out - delta >= m_producer->get_length())) {
return false;
}
if (right) {
......
......@@ -960,7 +960,6 @@ bool TimelineModel::requestClipInsertion(const QString &binClipId, int trackId,
if (useTargets && m_audioTarget == -1 && m_videoTarget == -1) {
useTargets = false;
}
if (dropType == PlaylistState::Disabled && (type == ClipType::AV || type == ClipType::Playlist)) {
if (m_audioTarget >= 0 && m_videoTarget == -1 && useTargets) {
// If audio target is set but no video target, only insert audio
......
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