Fix bug. Labels created tools from Operation section should be not movable when

use a tool.

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2017-04-26 08:19:39 +03:00
parent 89bf3cc005
commit 39a1c50022
2 changed files with 17 additions and 0 deletions

View File

@ -223,6 +223,22 @@ void VAbstractOperation::AllowSelecting(bool enabled)
} }
} }
//---------------------------------------------------------------------------------------------------------------------
void VAbstractOperation::EnableToolMove(bool move)
{
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->EnableToolMove(move);
}
}
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VAbstractOperation::AllowPointHover(bool enabled) void VAbstractOperation::AllowPointHover(bool enabled)
{ {

View File

@ -83,6 +83,7 @@ public slots:
virtual void AllowHover(bool enabled) Q_DECL_OVERRIDE; virtual void AllowHover(bool enabled) Q_DECL_OVERRIDE;
virtual void AllowSelecting(bool enabled) Q_DECL_OVERRIDE; virtual void AllowSelecting(bool enabled) Q_DECL_OVERRIDE;
virtual void EnableToolMove(bool move) Q_DECL_OVERRIDE;
void AllowPointHover(bool enabled); void AllowPointHover(bool enabled);
void AllowPointSelecting(bool enabled); void AllowPointSelecting(bool enabled);