Merge remote-tracking branch 'origin/develop' into claudio-dev

preferencesAboutTextFull
Claudio Valerio 12 years ago
commit 24b310b782
  1. 6
      src/domain/UBGraphicsScene.cpp

@ -775,9 +775,9 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
QList<QGraphicsItem*> collidItems = items(eraserBoundingRect, Qt::IntersectsItemBoundingRect); QList<QGraphicsItem*> collidItems = items(eraserBoundingRect, Qt::IntersectsItemBoundingRect);
QList<UBGraphicsPolygonItem*> intersectedItems; QList<UBGraphicsPolygonItem*> intersectedItems;
QList<QList<QPolygonF>> intersectedPolygons;
//qDebug() << "Start, eraser is " << eraserPath; typedef QList<QPolygonF> POLYGONSLIST;
QList<POLYGONSLIST> intersectedPolygons;
#pragma omp parallel for #pragma omp parallel for
for(int i=0; i<collidItems.size(); i++) for(int i=0; i<collidItems.size(); i++)
@ -793,7 +793,6 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
{ {
#pragma omp critical #pragma omp critical
{ {
//qDebug() << itemPainterPath << " - delete!";
// Compele remove item // Compele remove item
intersectedItems << pi; intersectedItems << pi;
intersectedPolygons << QList<QPolygonF>(); intersectedPolygons << QList<QPolygonF>();
@ -805,7 +804,6 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
QPainterPath newPath = itemPainterPath.subtracted(eraserPath); QPainterPath newPath = itemPainterPath.subtracted(eraserPath);
#pragma omp critical #pragma omp critical
{ {
//qDebug() << itemPainterPath << " - modify to - " << newPath;
intersectedItems << pi; intersectedItems << pi;
intersectedPolygons << newPath.simplified().toFillPolygons(pi->sceneTransform().inverted()); intersectedPolygons << newPath.simplified().toFillPolygons(pi->sceneTransform().inverted());
} }

Loading…
Cancel
Save