Fixed bug. Operation tools did not obey tool selection type.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-02-21 16:16:02 +02:00
parent 0941b018fd
commit d84fd78a38
2 changed files with 18 additions and 0 deletions

View File

@ -340,6 +340,23 @@ void VAbstractOperation::AllowElArcSelecting(bool enabled)
AllowCurveSelecting(enabled, GOType::EllipticalArc);
}
//---------------------------------------------------------------------------------------------------------------------
void VAbstractOperation::ToolSelectionType(const SelectionType &type)
{
VAbstractTool::ToolSelectionType(type);
QMapIterator<quint32, VAbstractSimple *> i(operatedObjects);
while (i.hasNext())
{
i.next();
if (i.value()->GetType() == GOType::Point)
{
VSimplePoint *item = qobject_cast<VSimplePoint *>(i.value());
SCASSERT(item != nullptr)
item->ToolSelectionType(selectionType);
}
}
}
//---------------------------------------------------------------------------------------------------------------------
void VAbstractOperation::Disable(bool disable, const QString &namePP)
{

View File

@ -102,6 +102,7 @@ public slots:
void AllowElArcHover(bool enabled);
void AllowElArcSelecting(bool enabled);
virtual void ToolSelectionType(const SelectionType &type);
virtual void Disable(bool disable, const QString &namePP) Q_DECL_OVERRIDE;
void ObjectSelected(bool selected, quint32 objId);
void DeleteFromLabel();