Skip to content

Commit bd0f5ca

Browse files
committed
Part: [skip ci] explicitly open transaction when opening the Attachment dialog
1 parent 28e40f8 commit bd0f5ca

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Mod/Part/Gui/TaskAttacher.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,8 @@ TaskDlgAttacher::~TaskDlgAttacher()
10411041

10421042
void TaskDlgAttacher::open()
10431043
{
1044-
1044+
Gui::Document* document = Gui::Application::Instance->getDocument(ViewProvider->getObject()->getDocument());
1045+
document->openCommand("Edit attachment");
10451046
}
10461047

10471048
void TaskDlgAttacher::clicked(int)
@@ -1061,20 +1062,21 @@ bool TaskDlgAttacher::accept()
10611062
auto obj = ViewProvider->getObject();
10621063

10631064
//DeepSOIC: changed this to heavily rely on dialog constantly updating feature properties
1064-
if (pcAttach->AttachmentOffset.isTouched()){
1065+
//if (pcAttach->AttachmentOffset.isTouched()){
10651066
Base::Placement plm = pcAttach->AttachmentOffset.getValue();
10661067
double yaw, pitch, roll;
10671068
plm.getRotation().getYawPitchRoll(yaw,pitch,roll);
10681069
Gui::cmdAppObjectArgs(obj, "AttachmentOffset = App.Placement(App.Vector(%.10f, %.10f, %.10f), App.Rotation(%.10f, %.10f, %.10f))",
10691070
plm.getPosition().x, plm.getPosition().y, plm.getPosition().z, yaw, pitch, roll);
1070-
}
1071+
//}
10711072

10721073
Gui::cmdAppObjectArgs(obj, "MapReversed = %s", pcAttach->MapReversed.getValue() ? "True" : "False");
10731074

10741075
Gui::cmdAppObjectArgs(obj, "Support = %s", pcAttach->Support.getPyReprString().c_str());
10751076

1076-
Gui::cmdAppObjectArgs(obj, "MapMode = '%s'", AttachEngine::getModeName(eMapMode(pcAttach->MapMode.getValue())).c_str());
1077+
Gui::cmdAppObjectArgs(obj, "MapPathParameter = %f", pcAttach->MapPathParameter.getValue());
10771078

1079+
Gui::cmdAppObjectArgs(obj, "MapMode = '%s'", AttachEngine::getModeName(eMapMode(pcAttach->MapMode.getValue())).c_str());
10781080
Gui::cmdAppObject(obj, "recompute()");
10791081

10801082
Gui::cmdGuiDocument(obj, "resetEdit()");

0 commit comments

Comments
 (0)