[TechDraw] Reimplement Rich Annotation parent linking
This commit is contained in:
@@ -61,28 +61,6 @@ DrawViewSymbol::DrawViewSymbol()
|
||||
|
||||
DrawViewSymbol::~DrawViewSymbol() {}
|
||||
|
||||
void DrawViewSymbol::touchTreeOwner()
|
||||
{
|
||||
auto owner = dynamic_cast<DrawView *>(Owner.getValue());
|
||||
if (owner) {
|
||||
owner->touch();
|
||||
}
|
||||
else { // If no owner is specified, touch all parent pages
|
||||
for (auto page : findAllParentPages()) {
|
||||
page->touch();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DrawViewSymbol::onBeforeChange(const App::Property *prop)
|
||||
{
|
||||
if (prop == &Owner && !isRestoring()) {
|
||||
touchTreeOwner();
|
||||
}
|
||||
|
||||
TechDraw::DrawView::onBeforeChange(prop);
|
||||
}
|
||||
|
||||
void DrawViewSymbol::onChanged(const App::Property* prop)
|
||||
{
|
||||
if (prop == &Symbol) {
|
||||
@@ -97,11 +75,6 @@ void DrawViewSymbol::onChanged(const App::Property* prop)
|
||||
//1 cycle
|
||||
updateFieldsInSymbol();
|
||||
}
|
||||
else if (prop == &Owner) {
|
||||
if (!isRestoring()) {
|
||||
touchTreeOwner();
|
||||
}
|
||||
}
|
||||
|
||||
TechDraw::DrawView::onChanged(prop);
|
||||
}
|
||||
@@ -124,11 +97,6 @@ App::DocumentObjectExecReturn* DrawViewSymbol::execute()
|
||||
return DrawView::execute();
|
||||
}
|
||||
|
||||
DrawView *DrawViewSymbol::claimParent() const
|
||||
{
|
||||
return dynamic_cast<DrawView *>(Owner.getValue());
|
||||
}
|
||||
|
||||
QRectF DrawViewSymbol::getRect() const
|
||||
{
|
||||
double w = 64.0;//must default to something
|
||||
|
||||
Reference in New Issue
Block a user