BezierSplineEditor::~BezierSplineEditor()
{
- if (m_pixmapCache)
- delete m_pixmapCache;
+ delete m_pixmapCache;
}
-CubicBezierSpline BezierSplineEditor::spline()
+CubicBezierSpline BezierSplineEditor::spline() const
{
return m_spline;
}
void BezierSplineEditor::setShowAllHandles(bool show)
{
- m_showAllHandles = show;
- update();
+ if (m_showAllHandles != show) {
+ m_showAllHandles = show;
+ update();
+ }
}
-int BezierSplineEditor::gridLines()
+int BezierSplineEditor::gridLines() const
{
return m_gridLines;
}
QWidget::leaveEvent(event);
}
-int BezierSplineEditor::nearestPointInRange(QPointF p, int wWidth, int wHeight, BezierSplineEditor::point_types* sel)
+int BezierSplineEditor::nearestPointInRange(const QPointF &p, int wWidth, int wHeight, BezierSplineEditor::point_types* sel)
{
double nearestDistanceSquared = 1000;
point_types selectedPoint = PTypeP;