TechDraw: add transactions to multiple commands (#22795)

* TechDraw: add transactions to multiple commands

* Feed each 'Create Dimension' option to the translation macro

* Call fixSceneDependencies when re-adding dimensions so that it shows up at the right place
This commit is contained in:
theo-vt
2025-08-18 11:46:15 -04:00
committed by GitHub
parent 867708c3c0
commit f32ae1ca17
8 changed files with 49 additions and 1 deletions

View File

@@ -51,6 +51,7 @@
#include "ZVALUE.h"
#include "TaskDimension.h"
#include "QGIViewDimension.h"
#include "ViewProviderPage.h"
#include "ViewProviderDimension.h"
using namespace TechDrawGui;
@@ -189,6 +190,15 @@ void ViewProviderDimension::updateData(const App::Property* prop)
return;
}
// This properties is changed when creating then on redo (or undo deletion)
// so does Reference3d, but using || would call fixSceneDependencies() twice
if (prop == &(getViewObject()->References2D)) {
// Ensure the QGraphicsItems hierarchy matches the DocumentObject's
if (ViewProviderPage* vpp = getViewProviderPage()) {
vpp->fixSceneDependencies();
}
}
//Skip QGIView X, Y processing - do not call ViewProviderDrawingView
Gui::ViewProviderDocumentObject::updateData(prop); //NOLINT
}