Fixed wrong color segment that connects label with point in Base point tool.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-07-07 14:35:55 +03:00
parent f0a84471b3
commit ed0d4df88f
3 changed files with 6 additions and 6 deletions

View File

@ -89,7 +89,7 @@ void VToolDoublePoint::setNameP2(const QString &name)
//---------------------------------------------------------------------------------------------------------------------
void VToolDoublePoint::SetEnabled(bool enabled)
{
SetToolEnabled(this, enabled);
SetToolEnabled(this, baseColor, enabled);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -94,8 +94,8 @@ void VToolSinglePoint::setName(const QString &name)
//---------------------------------------------------------------------------------------------------------------------
void VToolSinglePoint::SetEnabled(bool enabled)
{
SetToolEnabled(this, enabled);
SetToolEnabled(lineName, enabled);
SetToolEnabled(this, baseColor, enabled);
SetToolEnabled(lineName, Qt::black, enabled);
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -60,7 +60,7 @@ protected:
virtual void RefreshLine(quint32 id)=0;
template <typename T>
void SetToolEnabled(T *item, bool enabled);
void SetToolEnabled(T *item, const QColor &color, bool enabled);
template <typename T>
static void InitToolConnections(VMainGraphicsScene *scene, T *tool);
@ -97,12 +97,12 @@ void VAbstractPoint::ShowToolVisualization(bool show)
//---------------------------------------------------------------------------------------------------------------------
template <typename T>
void VAbstractPoint::SetToolEnabled(T *item, bool enabled)
void VAbstractPoint::SetToolEnabled(T *item, const QColor &color, bool enabled)
{
item->setEnabled(enabled);
if (enabled)
{
item->setPen(QPen(QColor(baseColor),
item->setPen(QPen(color,
qApp->toPixel(WidthHairLine(*VAbstractTool::data.GetPatternUnit()))/factor));
}
else