Gui: [skip ci] bind spin boxes to object in Placement dialog
This commit is contained in:
@@ -635,6 +635,21 @@ void Placement::on_resetButton_clicked()
|
||||
onPlacementChanged(0);
|
||||
}
|
||||
|
||||
void Placement::bindObject()
|
||||
{
|
||||
if (!selectionObjects.empty()) {
|
||||
App::DocumentObject* obj = selectionObjects.front().getObject();
|
||||
|
||||
ui->xPos->bind(App::ObjectIdentifier::parse(obj, propertyName + std::string(".Base.x")));
|
||||
ui->yPos->bind(App::ObjectIdentifier::parse(obj, propertyName + std::string(".Base.y")));
|
||||
ui->zPos->bind(App::ObjectIdentifier::parse(obj, propertyName + std::string(".Base.z")));
|
||||
|
||||
ui->yawAngle ->bind(App::ObjectIdentifier::parse(obj, propertyName + std::string(".Rotation.Yaw")));
|
||||
ui->pitchAngle->bind(App::ObjectIdentifier::parse(obj, propertyName + std::string(".Rotation.Pitch")));
|
||||
ui->rollAngle ->bind(App::ObjectIdentifier::parse(obj, propertyName + std::string(".Rotation.Roll")));
|
||||
}
|
||||
}
|
||||
|
||||
void Placement::directionActivated(int index)
|
||||
{
|
||||
if (ui->directionActivated(this, index)) {
|
||||
@@ -840,6 +855,11 @@ TaskPlacement::~TaskPlacement()
|
||||
// automatically deleted in the sub-class
|
||||
}
|
||||
|
||||
void TaskPlacement::bindObject()
|
||||
{
|
||||
widget->bindObject();
|
||||
}
|
||||
|
||||
void TaskPlacement::open()
|
||||
{
|
||||
widget->open();
|
||||
|
||||
Reference in New Issue
Block a user