Origin point shouldn't be in a rotation list.
--HG-- branch : feature
This commit is contained in:
parent
0052a883a4
commit
ba76ba2746
|
@ -64,13 +64,15 @@ DialogRotation::DialogRotation(const VContainer *data, const quint32 &toolId, QW
|
||||||
|
|
||||||
FillComboBoxPoints(ui->comboBoxOriginPoint);
|
FillComboBoxPoints(ui->comboBoxOriginPoint);
|
||||||
|
|
||||||
// flagName = true;
|
flagName = true;
|
||||||
CheckState();
|
CheckState();
|
||||||
|
|
||||||
connect(ui->lineEditSuffix, &QLineEdit::textChanged, this, &DialogRotation::SuffixChanged);
|
connect(ui->lineEditSuffix, &QLineEdit::textChanged, this, &DialogRotation::SuffixChanged);
|
||||||
connect(ui->toolButtonExprAngle, &QPushButton::clicked, this, &DialogRotation::FXAngle);
|
connect(ui->toolButtonExprAngle, &QPushButton::clicked, this, &DialogRotation::FXAngle);
|
||||||
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogRotation::AngleChanged);
|
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogRotation::AngleChanged);
|
||||||
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogRotation::DeployAngleTextEdit);
|
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogRotation::DeployAngleTextEdit);
|
||||||
|
connect(ui->comboBoxOriginPoint, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||||
|
this, &DialogRotation::PointChanged);
|
||||||
|
|
||||||
vis = new VisToolRotation(data);
|
vis = new VisToolRotation(data);
|
||||||
}
|
}
|
||||||
|
@ -195,6 +197,11 @@ void DialogRotation::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
{
|
{
|
||||||
if (type == SceneObject::Point)
|
if (type == SceneObject::Point)
|
||||||
{
|
{
|
||||||
|
if (objects.contains(id))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (SetObject(id, ui->comboBoxOriginPoint, ""))
|
if (SetObject(id, ui->comboBoxOriginPoint, ""))
|
||||||
{
|
{
|
||||||
VisToolRotation *operation = qobject_cast<VisToolRotation *>(vis);
|
VisToolRotation *operation = qobject_cast<VisToolRotation *>(vis);
|
||||||
|
@ -332,6 +339,24 @@ void DialogRotation::closeEvent(QCloseEvent *event)
|
||||||
DialogTool::closeEvent(event);
|
DialogTool::closeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
void DialogRotation::PointChanged()
|
||||||
|
{
|
||||||
|
QColor color = okColor;
|
||||||
|
if (objects.contains(getCurrentObjectId(ui->comboBoxOriginPoint)))
|
||||||
|
{
|
||||||
|
flagError = false;
|
||||||
|
color = errorColor;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
flagError = true;
|
||||||
|
color = okColor;
|
||||||
|
}
|
||||||
|
ChangeColor(ui->labelOriginPoint, color);
|
||||||
|
CheckState();
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
void DialogRotation::EvalAngle()
|
void DialogRotation::EvalAngle()
|
||||||
{
|
{
|
||||||
|
|
|
@ -75,6 +75,9 @@ protected:
|
||||||
virtual void SaveData() Q_DECL_OVERRIDE;
|
virtual void SaveData() Q_DECL_OVERRIDE;
|
||||||
virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
|
virtual void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void PointChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(DialogRotation)
|
Q_DISABLE_COPY(DialogRotation)
|
||||||
Ui::DialogRotation *ui;
|
Ui::DialogRotation *ui;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user