From 1cffddc672b9634b5c3805e2efd9c7068f789b71 Mon Sep 17 00:00:00 2001 From: dismine Date: Mon, 13 Jan 2014 00:34:36 +0200 Subject: [PATCH] Fixed method CheckLoops. --HG-- branch : feature --- src/container/vcontainer.cpp | 33 ++++++++++++++++----------------- src/tools/vabstracttool.h | 2 +- src/tools/vtooldetail.cpp | 23 ++++++++++------------- 3 files changed, 27 insertions(+), 31 deletions(-) diff --git a/src/container/vcontainer.cpp b/src/container/vcontainer.cpp index 5328f1a58..ab3b8e490 100644 --- a/src/container/vcontainer.cpp +++ b/src/container/vcontainer.cpp @@ -241,22 +241,22 @@ QVector VContainer::CorrectEquidistantPoints(const QVector &po correctPoints.append(points.at(i)); } } -// if(correctPoints.size()<3) -// { -// return correctPoints; -// } -// //Remove point on line -// QPointF point; -// for(qint32 i = 1; i VContainer::CheckLoops(const QVector &points) const /*We found loop.*/ ekvPoints.append(points.at(i)); ekvPoints.append(crosPoint); - ekvPoints.append(points.at(j+1)); i = j + 2; } } diff --git a/src/tools/vabstracttool.h b/src/tools/vabstracttool.h index f3c036024..638c092ee 100644 --- a/src/tools/vabstracttool.h +++ b/src/tools/vabstracttool.h @@ -304,7 +304,7 @@ protected: * @brief RemoveAllChild * @param domElement */ - void RemoveAllChild(QDomElement &domElement); + void RemoveAllChild(QDomElement &domElement); virtual void DeleteTool(QGraphicsItem *tool); template /** diff --git a/src/tools/vtooldetail.cpp b/src/tools/vtooldetail.cpp index 740512790..0999c4c59 100644 --- a/src/tools/vtooldetail.cpp +++ b/src/tools/vtooldetail.cpp @@ -251,24 +251,21 @@ QVariant VToolDetail::itemChange(QGraphicsItem::GraphicsItemChange change, const QGraphicsScene *sc = this->scene(); QRectF rect = sc->itemsBoundingRect(); //Correct BoundingRect - rect = QRectF(0, 0, rect.width() + rect.x(), rect.height() + rect.y()); + //rect = QRectF(0, 0, rect.width() + rect.x(), rect.height() + rect.y()); qDebug()<<"rect"< list = sc->views(); QRect rec = list[0]->contentsRect(); - qDebug()<<"rec"<transform(); + qDebug()<<"m11="<setSceneRect(rec); doc->haveLiteChange(); }