Commit 2bbdbc9b authored by Anatoly Mihalchenko's avatar Anatoly Mihalchenko

Eraser under Linux platform

parent dd8f52f1
...@@ -844,8 +844,11 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth) ...@@ -844,8 +844,11 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
// UBGraphicsPolygonItems and added to the scene // UBGraphicsPolygonItems and added to the scene
foreach(const QPolygonF &pol, croppedPathSimplified.toFillPolygons()) foreach(const QPolygonF &pol, croppedPathSimplified.toFillPolygons())
{ {
UBGraphicsPolygonItem* croppedPolygonItem = collidingPolygonItem->deepCopy(pol); UBGraphicsPolygonItem* croppedPolygonItem;
#pragma omp critical #pragma omp critical
{
croppedPolygonItem = collidingPolygonItem->deepCopy(pol);
if(NULL != pGroup){ if(NULL != pGroup){
croppedPolygonItem->setStrokesGroup(pGroup); croppedPolygonItem->setStrokesGroup(pGroup);
//pGroup->addToGroup(croppedPolygonItem); //pGroup->addToGroup(croppedPolygonItem);
...@@ -853,6 +856,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth) ...@@ -853,6 +856,7 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
// Add this new polygon to the 'added' list // Add this new polygon to the 'added' list
toBeAddedItems << croppedPolygonItem; toBeAddedItems << croppedPolygonItem;
} }
}
#pragma omp critical #pragma omp critical
// Remove the original polygonitem because it has been replaced by many smaller polygons // Remove the original polygonitem because it has been replaced by many smaller polygons
toBeRemovedItems << collidingPolygonItem; toBeRemovedItems << collidingPolygonItem;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment