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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user