Fix snapping when moving keyframe in effect stack

Allow negative rotation in Transform effect
parent b8e066af
......@@ -6,7 +6,7 @@
<parameter type="animatedrect" name="rect" default="0 0 %width %height 1">
<name>Rectangle</name>
</parameter>
<parameter type="animated" name="rotation" max="360" min="0" default="0">
<parameter type="animated" name="rotation" max="360" min="-360" default="0">
<name>Rotation</name>
</parameter>
<parameter type="list" name="compositing" default="0" paramlist="0;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;6;8">
......
......@@ -174,7 +174,7 @@ void AnimKeyframeRuler::mouseMoveEvent(QMouseEvent * event)
m_seekPosition = m_movingKeyframePos;
emit requestSeek(m_seekPosition);
}
else if (KdenliveSettings::snaptopoints() && qAbs(m_movingKeyframePos - m_position) < headOffset)
else if (KdenliveSettings::snaptopoints() && qAbs(m_movingKeyframePos - m_position) < headOffset / m_scale)
m_movingKeyframePos = m_position;
update();
return;
......
......@@ -166,7 +166,7 @@ void KeyframeHelper::mouseMoveEvent(QMouseEvent * event)
m_extraGeometries[i]->remove(m_movingItem.frame());
}
int pos = qBound(0, (int)(xPos / m_scale), frameLength);
if (KdenliveSettings::snaptopoints() && qAbs(pos - m_position) < headOffset)
if (KdenliveSettings::snaptopoints() && qAbs(pos - m_position) < headOffset / m_scale)
pos = m_position;
m_movingItem.frame(pos + m_offset);
for (int i = 0; i < m_extraMovingItems.count(); ++i) {
......
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