Disable curve if pattern piece disabled.
--HG-- branch : feature
This commit is contained in:
parent
8aa8438064
commit
06d415f320
|
@ -87,7 +87,6 @@ void VAbstractSpline::ChangedActivDraw(const QString &newName)
|
|||
VDrawTool::ChangedActivDraw(newName);
|
||||
const bool selectable = (nameActivDraw == newName);
|
||||
this->setEnabled(selectable);
|
||||
this->setPen(QPen(currentColor, qApp->toPixel(qApp->widthHairLine())/factor));
|
||||
emit setEnabledPoint(selectable);
|
||||
}
|
||||
|
||||
|
@ -219,3 +218,17 @@ void VAbstractSpline::ShowFoot(bool show)
|
|||
controlPoints.at(i)->setVisible(show);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VAbstractSpline::setEnabled(bool enabled)
|
||||
{
|
||||
QGraphicsPathItem::setEnabled(enabled);
|
||||
if (enabled)
|
||||
{
|
||||
setPen(QPen(QColor(lineColor), qApp->toPixel(qApp->widthHairLine())/factor));
|
||||
}
|
||||
else
|
||||
{
|
||||
setPen(QPen(Qt::gray, qApp->toPixel(qApp->widthHairLine())/factor));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,9 @@ public:
|
|||
enum { Type = UserType + static_cast<int>(Tool::AbstractSpline)};
|
||||
virtual QString getTagName() const;
|
||||
void ShowFoot(bool show);
|
||||
|
||||
void setEnabled(bool enabled);
|
||||
|
||||
public slots:
|
||||
virtual void FullUpdateFromFile ();
|
||||
void Disable(bool disable);
|
||||
|
|
Loading…
Reference in New Issue
Block a user