***************************************************************************/
#include "beziersplineeditor.h"
+#include "kdenlivesettings.h"
#include <QPainter>
#include <QMouseEvent>
return BPoint();
}
-void BezierSplineEditor::updateCurrentPoint(const BPoint& p)
+void BezierSplineEditor::updateCurrentPoint(const BPoint& p, bool final)
{
if (m_currentPointIndex >= 0) {
m_spline.setPoint(m_currentPointIndex, p);
// during validation the point might have changed
emit currentPoint(m_spline.getPoint(m_currentPointIndex));
- emit modified();
+ if (final)
+ emit modified();
update();
}
}
void BezierSplineEditor::paintEvent(QPaintEvent* event)
{
- Q_UNUSED(event);
+ Q_UNUSED(event)
QPainter p(this);
}
emit currentPoint(point);
+ if (KdenliveSettings::dragvalue_directupdate())
+ emit modified();
update();
}
}
-void BezierSplineEditor::mouseDoubleClickEvent(QMouseEvent* event)
+void BezierSplineEditor::mouseDoubleClickEvent(QMouseEvent* /*event*/)
{
if (m_currentPointIndex >= 0) {
BPoint p = m_spline.getPoint(m_currentPointIndex);
int BezierSplineEditor::nearestPointInRange(QPointF p, int wWidth, int wHeight, BezierSplineEditor::point_types* sel)
{
double nearestDistanceSquared = 1000;
- point_types selectedPoint;
+ point_types selectedPoint = PTypeP;
int nearestIndex = -1;
int i = 0;