Changing settings for move and rotate tools through property browser does not

take in count previous change for label point and Show label option.
(grafted from 8c626cf05d645f1e9b40dd44a9f361ff1fd2dad7)

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-06-18 19:04:26 +03:00
parent 991b64cf54
commit 643dce08b7
2 changed files with 14 additions and 0 deletions

View File

@ -51,6 +51,7 @@
- [#971] Group operation do not work with VCubicBezierPath.
- Regression in method DialogTool::GetNodeName.
- Fix visualization for tool Point from arc and tangent.
- Changing settings for move and rotate tools through property browser does not take in count previous change for label point and Show label option.
# Version 0.6.1 October 23, 2018
- [#885] Regression. Broken support for multi size measurements.

View File

@ -495,6 +495,12 @@ void VAbstractOperation::ChangeLabelVisibility(quint32 id, bool visible)
VAbstractSimple *obj = operatedObjects.value(id);
if (obj && obj->GetType() == GOType::Point)
{
auto dItem = std::find_if(destination.begin(), destination.end(),
[id](const DestinationItem &dItem) { return dItem.id == id; });
if (dItem != destination.cend())
{
dItem->showLabel = visible;
}
qApp->getUndoStack()->push(new OperationShowLabel(doc, m_id, id, visible));
}
}
@ -508,6 +514,13 @@ void VAbstractOperation::UpdateNamePosition(quint32 id, const QPointF &pos)
VAbstractSimple *obj = operatedObjects.value(id);
if (obj && obj->GetType() == GOType::Point)
{
auto dItem = std::find_if(destination.begin(), destination.end(),
[id](const DestinationItem &dItem) { return dItem.id == id; });
if (dItem != destination.end())
{
dItem->mx = pos.x();
dItem->my = pos.y();
}
qApp->getUndoStack()->push(new OperationMoveLabel(m_id, doc, pos, id));
}
}