Use variable "enabled" everywhere.
--HG-- branch : feature
This commit is contained in:
parent
e94c5070dc
commit
16662a34d5
|
@ -85,9 +85,8 @@ void VAbstractSpline::Disable(bool disable)
|
|||
void VAbstractSpline::ChangedActivDraw(const QString &newName)
|
||||
{
|
||||
VDrawTool::ChangedActivDraw(newName);
|
||||
const bool selectable = (nameActivDraw == newName);
|
||||
this->setEnabled(selectable);
|
||||
emit setEnabledPoint(selectable);
|
||||
this->setEnabled(enabled);
|
||||
emit setEnabledPoint(enabled);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -60,10 +60,8 @@ VToolCut::VToolCut(VPattern *doc, VContainer *data, const quint32 &id, const QSt
|
|||
void VToolCut::ChangedActivDraw(const QString &newName)
|
||||
{
|
||||
VToolPoint::ChangedActivDraw(newName);
|
||||
const bool flag = (nameActivDraw == newName);
|
||||
this->setEnabled(flag);
|
||||
firstCurve->ChangedActivDraw(flag);
|
||||
secondCurve->ChangedActivDraw(flag);
|
||||
firstCurve->ChangedActivDraw(enabled);
|
||||
secondCurve->ChangedActivDraw(enabled);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -238,7 +238,7 @@ void VToolLine::Disable(bool disable)
|
|||
void VToolLine::ChangedActivDraw(const QString &newName)
|
||||
{
|
||||
VDrawTool::ChangedActivDraw(newName);
|
||||
this->setEnabled(nameActivDraw == newName);
|
||||
this->setEnabled(enabled);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -70,8 +70,8 @@ VToolLinePoint::~VToolLinePoint()
|
|||
void VToolLinePoint::ChangedActivDraw(const QString &newName)
|
||||
{
|
||||
VToolPoint::ChangedActivDraw(newName);
|
||||
this->setEnabled(nameActivDraw == newName);
|
||||
mainLine->setEnabled(nameActivDraw == newName);
|
||||
this->setEnabled(enabled);
|
||||
mainLine->setEnabled(enabled);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -133,8 +133,8 @@ void VToolPoint::UpdateNamePosition(qreal mx, qreal my)
|
|||
void VToolPoint::ChangedActivDraw(const QString &newName)
|
||||
{
|
||||
VDrawTool::ChangedActivDraw(newName);
|
||||
this->setEnabled(nameActivDraw == newName);
|
||||
namePoint->setEnabled(nameActivDraw == newName);
|
||||
this->setEnabled(enabled);
|
||||
namePoint->setEnabled(enabled);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user