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)
|
void VAbstractSpline::ChangedActivDraw(const QString &newName)
|
||||||
{
|
{
|
||||||
VDrawTool::ChangedActivDraw(newName);
|
VDrawTool::ChangedActivDraw(newName);
|
||||||
const bool selectable = (nameActivDraw == newName);
|
this->setEnabled(enabled);
|
||||||
this->setEnabled(selectable);
|
emit setEnabledPoint(enabled);
|
||||||
emit setEnabledPoint(selectable);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -60,10 +60,8 @@ VToolCut::VToolCut(VPattern *doc, VContainer *data, const quint32 &id, const QSt
|
||||||
void VToolCut::ChangedActivDraw(const QString &newName)
|
void VToolCut::ChangedActivDraw(const QString &newName)
|
||||||
{
|
{
|
||||||
VToolPoint::ChangedActivDraw(newName);
|
VToolPoint::ChangedActivDraw(newName);
|
||||||
const bool flag = (nameActivDraw == newName);
|
firstCurve->ChangedActivDraw(enabled);
|
||||||
this->setEnabled(flag);
|
secondCurve->ChangedActivDraw(enabled);
|
||||||
firstCurve->ChangedActivDraw(flag);
|
|
||||||
secondCurve->ChangedActivDraw(flag);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -238,7 +238,7 @@ void VToolLine::Disable(bool disable)
|
||||||
void VToolLine::ChangedActivDraw(const QString &newName)
|
void VToolLine::ChangedActivDraw(const QString &newName)
|
||||||
{
|
{
|
||||||
VDrawTool::ChangedActivDraw(newName);
|
VDrawTool::ChangedActivDraw(newName);
|
||||||
this->setEnabled(nameActivDraw == newName);
|
this->setEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -70,8 +70,8 @@ VToolLinePoint::~VToolLinePoint()
|
||||||
void VToolLinePoint::ChangedActivDraw(const QString &newName)
|
void VToolLinePoint::ChangedActivDraw(const QString &newName)
|
||||||
{
|
{
|
||||||
VToolPoint::ChangedActivDraw(newName);
|
VToolPoint::ChangedActivDraw(newName);
|
||||||
this->setEnabled(nameActivDraw == newName);
|
this->setEnabled(enabled);
|
||||||
mainLine->setEnabled(nameActivDraw == newName);
|
mainLine->setEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -133,8 +133,8 @@ void VToolPoint::UpdateNamePosition(qreal mx, qreal my)
|
||||||
void VToolPoint::ChangedActivDraw(const QString &newName)
|
void VToolPoint::ChangedActivDraw(const QString &newName)
|
||||||
{
|
{
|
||||||
VDrawTool::ChangedActivDraw(newName);
|
VDrawTool::ChangedActivDraw(newName);
|
||||||
this->setEnabled(nameActivDraw == newName);
|
this->setEnabled(enabled);
|
||||||
namePoint->setEnabled(nameActivDraw == newName);
|
namePoint->setEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user