Set snap point to last zone frame, not +1

parent cbd6df2f
......@@ -137,11 +137,11 @@ void MonitorProxy::setZoneIn(int pos)
void MonitorProxy::setZoneOut(int pos)
{
if (m_zoneOut > 0) {
emit removeSnap(m_zoneOut);
emit removeSnap(m_zoneOut - 1);
}
m_zoneOut = pos;
if (pos > 0) {
emit addSnap(pos);
emit addSnap(pos - 1);
}
emit zoneChanged();
}
......@@ -152,7 +152,7 @@ void MonitorProxy::setZone(int in, int out)
emit removeSnap(m_zoneIn);
}
if (m_zoneOut > 0) {
emit removeSnap(m_zoneOut);
emit removeSnap(m_zoneOut - 1);
}
m_zoneIn = in;
m_zoneOut = out;
......@@ -160,7 +160,7 @@ void MonitorProxy::setZone(int in, int out)
emit addSnap(m_zoneIn);
}
if (m_zoneOut > 0) {
emit addSnap(m_zoneOut);
emit addSnap(m_zoneOut - 1);
}
emit zoneChanged();
}
......
......@@ -703,13 +703,13 @@ void TimelineController::setZone(const QPoint &zone)
m_model->removeSnap(m_zone.x());
}
if (m_zone.y() > 0) {
m_model->removeSnap(m_zone.y());
m_model->removeSnap(m_zone.y() - 1);
}
if (zone.x() > 0) {
m_model->addSnap(zone.x());
}
if (zone.y() > 0) {
m_model->addSnap(zone.y());
m_model->addSnap(zone.y() - 1);
}
m_zone = zone;
emit zoneChanged();
......@@ -730,10 +730,10 @@ void TimelineController::setZoneIn(int inPoint)
void TimelineController::setZoneOut(int outPoint)
{
if (m_zone.y() > 0) {
m_model->removeSnap(m_zone.y());
m_model->removeSnap(m_zone.y() - 1);
}
if (outPoint > 0) {
m_model->addSnap(outPoint);
m_model->addSnap(outPoint - 1);
}
m_zone.setY(outPoint);
emit zoneMoved(m_zone);
......
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