TechDraw: Fix balloon annotation unlinked after undo-redo (#22805)
* TechDraw: remove then add balloon annotation when changing the SourceView * Use fixSceneDependencies
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
#include "QGIViewBalloon.h"
|
||||
#include "TaskBalloon.h"
|
||||
#include "ViewProviderBalloon.h"
|
||||
#include "ViewProviderPage.h"
|
||||
|
||||
using namespace TechDrawGui;
|
||||
using namespace TechDraw;
|
||||
@@ -115,12 +116,18 @@ void ViewProviderBalloon::updateData(const App::Property* prop)
|
||||
//Balloon handles X, Y updates differently that other QGIView
|
||||
//call QGIViewBalloon::updateView
|
||||
if (prop == &(getViewObject()->X) ||
|
||||
prop == &(getViewObject()->Y) ){
|
||||
prop == &(getViewObject()->Y)){
|
||||
QGIView* qgiv = getQView();
|
||||
if (qgiv) {
|
||||
qgiv->updateView(true);
|
||||
}
|
||||
}
|
||||
if (prop == &(getViewObject()->SourceView)) {
|
||||
// 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);
|
||||
|
||||
Reference in New Issue
Block a user