diff --git a/src/libs/vtools/tools/drawTools/operation/flipping/vabstractflipping.h b/src/libs/vtools/tools/drawTools/operation/flipping/vabstractflipping.h index ff662f328..fd2893b6c 100644 --- a/src/libs/vtools/tools/drawTools/operation/flipping/vabstractflipping.h +++ b/src/libs/vtools/tools/drawTools/operation/flipping/vabstractflipping.h @@ -94,8 +94,6 @@ DestinationItem VAbstractFlipping::CreateItem(quint32 idTool, const SourceItem & } DestinationItem item; - item.mx = INT_MAX; - item.my = INT_MAX; item.id = data->AddGObject(new Item(rotated)); return item; } diff --git a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp index 05a987b92..fc4b3bbb7 100644 --- a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.cpp @@ -252,8 +252,8 @@ QVector VAbstractOperation::ExtractDestinationData(const QDomEl { DestinationItem d; d.id = VDomDocument::GetParametrUInt(element, AttrIdObject, NULL_ID_STR); - d.mx = qApp->toPixel(VDomDocument::GetParametrDouble(element, AttrMx, QString::number(INT_MAX))); - d.my = qApp->toPixel(VDomDocument::GetParametrDouble(element, AttrMy, QString::number(INT_MAX))); + d.mx = qApp->toPixel(VDomDocument::GetParametrDouble(element, AttrMx, QChar('1'))); + d.my = qApp->toPixel(VDomDocument::GetParametrDouble(element, AttrMy, QChar('1'))); d.showLabel = VDomDocument::GetParametrBool(element, AttrShowLabel, trueStr); destination.append(d); } @@ -754,7 +754,7 @@ void VAbstractOperation::SaveSourceDestination(QDomElement &tag) QDomElement item = doc->createElement(TagItem); doc->SetAttribute(item, AttrIdObject, dItem.id); - VAbstractSimple *obj = operatedObjects.value(dItem.id); + VAbstractSimple *obj = operatedObjects.value(dItem.id, nullptr); doc->SetAttributeOrRemoveIf(item, AttrMx, qApp->fromPixel(dItem.mx), obj && obj->GetType() != GOType::Point); diff --git a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h index d23b88bbc..dc077446d 100644 --- a/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h +++ b/src/libs/vtools/tools/drawTools/operation/vabstractoperation.h @@ -45,10 +45,10 @@ struct DestinationItem { - quint32 id; - qreal mx; - qreal my; - bool showLabel; + quint32 id{NULL_ID}; + qreal mx{1}; + qreal my{1}; + bool showLabel{true}; }; struct VAbstractOperationInitData : VDrawToolInitData diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp index 8646ad2c4..957d70007 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolmove.cpp @@ -629,8 +629,6 @@ DestinationItem VToolMove::CreateItem(quint32 idTool, const SourceItem &sItem, q } DestinationItem item; - item.mx = INT_MAX; - item.my = INT_MAX; item.id = data->AddGObject(new Item(moved)); return item; } diff --git a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp index de1829a23..7e9687da0 100644 --- a/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp +++ b/src/libs/vtools/tools/drawTools/operation/vtoolrotation.cpp @@ -440,8 +440,6 @@ DestinationItem VToolRotation::CreateItem(quint32 idTool, const SourceItem &sIte } DestinationItem item; - item.mx = INT_MAX; - item.my = INT_MAX; item.id = data->AddGObject(new Item(rotated)); return item; }