Fix setting zone when working with slow codecs

svn path=/trunk/kdenlive/; revision=6008
parent 9a4d506b
......@@ -428,7 +428,7 @@ void Monitor::slotZoneMoved(int start, int end)
void Monitor::slotSetZoneStart()
{
m_ruler->setZone(render->seekFramePosition(), -1);
m_ruler->setZone(m_ruler->position(), -1);
emit zoneUpdated(m_ruler->zone());
checkOverlay();
setClipZone(m_ruler->zone());
......@@ -436,7 +436,7 @@ void Monitor::slotSetZoneStart()
void Monitor::slotSetZoneEnd()
{
m_ruler->setZone(-1, render->seekFramePosition());
m_ruler->setZone(-1, m_ruler->position());
emit zoneUpdated(m_ruler->zone());
checkOverlay();
setClipZone(m_ruler->zone());
......@@ -549,7 +549,7 @@ void Monitor::slotMouseSeek(int eventDelta, bool fast)
if (fast) {
int delta = m_monitorManager->timecode().fps();
if (eventDelta > 0) delta = 0 - delta;
slotSeek(render->seekFramePosition() - delta);
slotSeek(m_ruler->position() - delta);
} else {
if (eventDelta >= 0) slotForwardOneFrame();
else slotRewindOneFrame();
......@@ -620,7 +620,7 @@ void Monitor::slotSeek(int pos)
void Monitor::checkOverlay()
{
if (m_overlay == NULL) return;
int pos = render->seekFramePosition();
int pos = m_ruler->position();
QPoint zone = m_ruler->zone();
if (pos == zone.x())
m_overlay->setOverlayText(i18n("In Point"));
......
......@@ -140,6 +140,11 @@ bool SmallRuler::slotNewValue(int value)
return true;
}
int SmallRuler::position() const
{
return m_cursorFramePosition;
}
//virtual
void SmallRuler::resizeEvent(QResizeEvent *)
{
......
......@@ -37,6 +37,7 @@ public:
void setZone(int start, int end);
QPoint zone();
void setMarkers(QList < int > list);
int position() const;
protected:
virtual void paintEvent(QPaintEvent *e);
......
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