#include "abstractclipitem.h"
#include "customtrackscene.h"
+#include "kdenlivesettings.h"
AbstractClipItem::AbstractClipItem(const ItemInfo info, const QRectF& rect, double fps): QGraphicsRectItem(rect), m_track(0), m_fps(fps), m_editedKeyframe(-1), m_selectedKeyframe(0), m_keyframeFactor(1) {
setFlags(/*QGraphicsItem::ItemClipsToShape | */QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable);
m_cropStart = pos;
}
+void AbstractClipItem::updateItem() {
+ m_track = (int)(scenePos().y() / KdenliveSettings::trackheight());
+ m_startPos = GenTime((int) scenePos().x(), m_fps);
+}
+
void AbstractClipItem::updateRectGeometry() {
setRect(0, 0, cropDuration().frames(m_fps) - 0.02, rect().height());
}