]> git.sesse.net Git - kdenlive/blobdiff - src/guide.cpp
Fetch audio thumbs one after another, so that we don't create hundreds of threads:
[kdenlive] / src / guide.cpp
index 541a209c95cf17b6969d266d1ae060697cf4b5a3..299a82b07f8b4f4b7659f855232601fe38ccbd65 100644 (file)
@@ -40,6 +40,7 @@ Guide::Guide(CustomTrackView *view, GenTime pos, QString label, double height) :
 #endif
     setToolTip(label);
     setLine(0, 0, 0, height);
+    if (m_position < GenTime()) m_position = GenTime();
     setPos(m_position.frames(m_view->fps()), 0);
     m_pen.setWidthF(0);
     m_pen.setColor(QColor(0, 0, 200, 180));
@@ -113,6 +114,7 @@ QVariant Guide::itemChange(GraphicsItemChange change, const QVariant &value)
         QPointF newPos = value.toPointF();
         newPos.setY(0);
         newPos.setX(m_view->getSnapPointForPos(newPos.x()));
+        if (newPos.x() < 0.0) newPos.setX(0.0);
         return newPos;
     }
     return QGraphicsItem::itemChange(change, value);
@@ -125,7 +127,7 @@ QRectF Guide::boundingRect() const
     double width = m_pen.widthF() / scale * 2;
     QRectF rect(line().x1() - width / 2 , line().y1(), width, line().y2() - line().y1());
     if (KdenliveSettings::showmarkers()) {
-        rect.setWidth(width + m_width / scale);
+        rect.setWidth(width + m_width);
     }
     return rect;
 }