Commit 89709f47 authored by Claudio Valerio's avatar Claudio Valerio

fixed lags on strokes load

parent 3d19071f
This diff is collapsed.
......@@ -50,6 +50,7 @@ class UBGraphicsTriangle;
class UBGraphicsCache;
class IDataStorage;
class UBGraphicsGroupContainerItem;
class UBGraphicsStrokesGroup;
class UBSvgSubsetAdaptor
{
......@@ -172,6 +173,8 @@ class UBSvgSubsetAdaptor
QString mNamespaceUri;
UBGraphicsScene *mScene;
QMap<QString,UBGraphicsStrokesGroup*> mStrokesList;
};
class UBSvgSubsetWriter
......
......@@ -826,14 +826,14 @@ void UBGraphicsScene::eraseLineTo(const QPointF &pEndPoint, const qreal &pWidth)
if (!intersectedPolygons[i].empty())
{
// intersected polygons generated as QList<QPolygon> QPainterPath::toFillPolygons(),
// so each intersectedPolygonItem has one or couple of QPolygons who should be removed from it.
// intersected polygons generated as QList<QPolygon> QPainterPath::toFillPolygons(),
// so each intersectedPolygonItem has one or couple of QPolygons who should be removed from it.
for(int j = 0; j < intersectedPolygons[i].size(); j++)
{
// create small polygon from couple of polygons to replace particular erased polygon
UBGraphicsPolygonItem* polygonItem = new UBGraphicsPolygonItem(intersectedPolygons[i][j], intersectedPolygonItem->parentItem());
intersectedPolygonItem->copyItemParameters(polygonItem);
intersectedPolygonItem->copyItemParameters(polygonItem);
polygonItem->setStroke(intersectedPolygonItem->stroke());
polygonItem->setStrokesGroup(intersectedPolygonItem->strokesGroup());
intersectedPolygonItem->strokesGroup()->addToGroup(polygonItem);
......
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