From 0925d9a47ee795e3c1ba9436ff015def4e7b1b74 Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 16 Dec 2022 17:49:22 +0100 Subject: [PATCH] Gui: simplify logic of Placement dialog --- src/Gui/Placement.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Gui/Placement.cpp b/src/Gui/Placement.cpp index 9aa366755a..cd30ce8d4e 100644 --- a/src/Gui/Placement.cpp +++ b/src/Gui/Placement.cpp @@ -107,8 +107,7 @@ PlacementHandler::PlacementHandler() void PlacementHandler::openTransactionIfNeeded() { - if (propertyName != "Placement") { - changeProperty = true; + if (changeProperty) { openTransaction(); } } @@ -116,6 +115,9 @@ void PlacementHandler::openTransactionIfNeeded() void PlacementHandler::setPropertyName(const std::string& name) { propertyName = name; + // Only the Placement property it's possible to directly change the Inventor representation. + // For other placement properties with a different name the standard property handling must be used. + changeProperty = (propertyName != "Placement"); } const std::string& PlacementHandler::getPropertyName() const @@ -192,7 +194,6 @@ void PlacementHandler::applyPlacement(const Base::Placement& p, bool incremental std::vector sel = getSelectedObjects(document); if (!sel.empty()) { - // apply transformation only on view matrix not on placement property for (const auto & it : sel) { applyPlacement(document, it, p, incremental); }