[TechDraw] Add Owner property to Symbols
This commit is contained in:
@@ -375,6 +375,11 @@ bool DrawView::isInClip()
|
||||
return false;
|
||||
}
|
||||
|
||||
DrawView *DrawView::claimParent() const
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DrawViewClip* DrawView::getClipGroup()
|
||||
{
|
||||
std::vector<App::DocumentObject*> parent = getInList();
|
||||
|
||||
@@ -84,6 +84,8 @@ public:
|
||||
|
||||
virtual DrawPage* findParentPage() const;
|
||||
virtual std::vector<DrawPage*> findAllParentPages() const;
|
||||
virtual DrawView *claimParent() const;
|
||||
|
||||
virtual int countParentPages() const;
|
||||
virtual QRectF getRect() const; //must be overridden by derived class
|
||||
QRectF getRectAligned() const;
|
||||
|
||||
@@ -51,6 +51,9 @@ DrawViewSymbol::DrawViewSymbol()
|
||||
ADD_PROPERTY_TYPE(Symbol, (""), vgroup, App::Prop_None, "The SVG code defining this symbol");
|
||||
ADD_PROPERTY_TYPE(EditableTexts, (""), vgroup, App::Prop_None,
|
||||
"Substitution values for the editable strings in this symbol");
|
||||
ADD_PROPERTY_TYPE(Owner, (nullptr), vgroup, (App::PropertyType)(App::Prop_None),
|
||||
"Feature to which this symbol is attached");
|
||||
|
||||
ScaleType.setValue("Custom");
|
||||
Scale.setStatus(App::Property::ReadOnly, false);
|
||||
Symbol.setStatus(App::Property::Hidden, true);
|
||||
@@ -58,6 +61,28 @@ 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) {
|
||||
@@ -72,10 +97,26 @@ void DrawViewSymbol::onChanged(const App::Property* prop)
|
||||
//1 cycle
|
||||
updateFieldsInSymbol();
|
||||
}
|
||||
else if (prop == &Owner) {
|
||||
if (!isRestoring()) {
|
||||
touchTreeOwner();
|
||||
}
|
||||
}
|
||||
|
||||
TechDraw::DrawView::onChanged(prop);
|
||||
}
|
||||
|
||||
short DrawViewSymbol::mustExecute() const
|
||||
{
|
||||
if (!isRestoring()) {
|
||||
if (Owner.isTouched()) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
return DrawView::mustExecute();
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn* DrawViewSymbol::execute()
|
||||
{
|
||||
//nothing to do. DVS is just a container for properties.
|
||||
@@ -83,6 +124,11 @@ 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
|
||||
|
||||
@@ -48,7 +48,9 @@ public:
|
||||
|
||||
App::PropertyString Symbol;
|
||||
App::PropertyStringList EditableTexts;
|
||||
App::PropertyLink Owner;
|
||||
|
||||
short mustExecute() const override;
|
||||
/** @name methods override Feature */
|
||||
//@{
|
||||
/// recalculate the Feature
|
||||
@@ -59,6 +61,7 @@ public:
|
||||
const char* getViewProviderName() const override {
|
||||
return "TechDrawGui::ViewProviderSymbol";
|
||||
}
|
||||
DrawView *claimParent(void) const override;
|
||||
QRectF getRect() const override;
|
||||
bool checkFit(TechDraw::DrawPage* p) const override;
|
||||
|
||||
@@ -66,6 +69,8 @@ public:
|
||||
PyObject *getPyObject() override;
|
||||
|
||||
protected:
|
||||
void touchTreeOwner();
|
||||
void onBeforeChange(const App::Property* prop) override;
|
||||
void onChanged(const App::Property* prop) override;
|
||||
Base::BoundBox3d bbox;
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
# include <BRepBuilderAPI_MakeVertex.hxx>
|
||||
# include <BRepBuilderAPI_MakeWire.hxx>
|
||||
# include <BRepExtrema_DistShapeShape.hxx>
|
||||
# include <BRepGProp.hxx>
|
||||
# include <BRepLib.hxx>
|
||||
# include <BRepLProp_CLProps.hxx>
|
||||
# include <BRepTools.hxx>
|
||||
@@ -43,6 +44,7 @@
|
||||
# include <GC_MakeEllipse.hxx>
|
||||
# include <gce_MakeCirc.hxx>
|
||||
# include <GCPnts_AbscissaPoint.hxx>
|
||||
# include <GProp_GProps.hxx>
|
||||
# include <Geom_BSplineCurve.hxx>
|
||||
# include <Geom_BezierCurve.hxx>
|
||||
# include <Geom_Circle.hxx>
|
||||
@@ -158,6 +160,14 @@ TopoDS_Face Face::toOccFace() const
|
||||
return TopoDS_Face();
|
||||
}
|
||||
|
||||
//**** Face
|
||||
Base::Vector3d Face::getCenter() const {
|
||||
GProp_GProps faceProps;
|
||||
BRepGProp::SurfaceProperties(toOccFace(), faceProps);
|
||||
|
||||
return DrawUtil::toVector3d(faceProps.CentreOfMass());
|
||||
}
|
||||
|
||||
Face::~Face()
|
||||
{
|
||||
for(auto it : wires) {
|
||||
|
||||
@@ -347,6 +347,8 @@ class TechDrawExport Face
|
||||
~Face();
|
||||
TopoDS_Face toOccFace() const;
|
||||
std::vector<Wire *> wires;
|
||||
|
||||
Base::Vector3d getCenter() const;
|
||||
};
|
||||
using FacePtr = std::shared_ptr<Face>;
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <Mod/TechDraw/App/DrawView.h>
|
||||
#include <Mod/TechDraw/App/DrawViewAnnotation.h>
|
||||
#include <Mod/TechDraw/App/DrawViewPart.h>
|
||||
#include <Mod/TechDraw/App/DrawViewSymbol.h>
|
||||
#include <Mod/TechDraw/App/DrawWeldSymbol.h>
|
||||
#include <Mod/TechDraw/App/DrawUtil.h>
|
||||
|
||||
@@ -1618,19 +1619,39 @@ CmdTechDrawSurfaceFinishSymbols::CmdTechDrawSurfaceFinishSymbols()
|
||||
void CmdTechDrawSurfaceFinishSymbols::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
std::string ownerName;
|
||||
std::vector<Gui::SelectionObject> selection = this->getSelection().getSelectionEx();
|
||||
if (selection.empty())
|
||||
{
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("SurfaceFinishSymbols"), QObject::tr("Selection is empty"));
|
||||
return;
|
||||
TechDraw::DrawPage *page = DrawGuiUtil::findPage(this);
|
||||
if (!page) {
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("SurfaceFinishSymbols"),
|
||||
QObject::tr("No page to insert the symbol!"));
|
||||
return;
|
||||
}
|
||||
|
||||
ownerName = page->getNameInDocument();
|
||||
}
|
||||
TechDraw::DrawViewPart* objFeat = dynamic_cast<TechDraw::DrawViewPart*> (selection[0].getObject());
|
||||
if(!objFeat)
|
||||
{
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("SurfaceFinishSymbols"), QObject::tr("No object selected"));
|
||||
return;
|
||||
else {
|
||||
auto objFeat = dynamic_cast<TechDraw::DrawView *>(selection.front().getObject());
|
||||
if (!objFeat->isDerivedFrom(TechDraw::DrawViewPart::getClassTypeId())
|
||||
&& !objFeat->isDerivedFrom(TechDraw::DrawLeaderLine::getClassTypeId())) {
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("SurfaceFinishSymbols"),
|
||||
QObject::tr("Selected object is not a part view, nor a leader line"));
|
||||
return;
|
||||
}
|
||||
|
||||
ownerName = objFeat->getNameInDocument();
|
||||
|
||||
const std::vector<std::string> &subNames = selection.front().getSubNames();
|
||||
if (!subNames.empty()) {
|
||||
ownerName += '.';
|
||||
ownerName += subNames.front();
|
||||
}
|
||||
}
|
||||
Gui::Control().showDialog(new TechDrawGui::TaskDlgSurfaceFinishSymbols(objFeat));
|
||||
|
||||
Gui::Control().showDialog(new TechDrawGui::TaskDlgSurfaceFinishSymbols(ownerName));
|
||||
}
|
||||
|
||||
bool CmdTechDrawSurfaceFinishSymbols::isActive()
|
||||
|
||||
@@ -663,6 +663,26 @@ void QGIView::addArbitraryItem(QGraphicsItem* qgi)
|
||||
}
|
||||
}
|
||||
|
||||
void QGIView::switchParentItem(QGIView *targetParent)
|
||||
{
|
||||
auto currentParent = dynamic_cast<QGIView *>(this->parentItem());
|
||||
if (currentParent != targetParent) {
|
||||
if (targetParent) {
|
||||
targetParent->addToGroup(this);
|
||||
}
|
||||
else {
|
||||
currentParent->removeFromGroup(this);
|
||||
}
|
||||
|
||||
if (currentParent) {
|
||||
currentParent->updateView();
|
||||
}
|
||||
if (targetParent) {
|
||||
targetParent->updateView();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QGIView::setStack(int z)
|
||||
{
|
||||
m_zOrder = z;
|
||||
|
||||
@@ -155,8 +155,8 @@ public:
|
||||
static int exactFontSize(std::string fontFamily, double nominalSize);
|
||||
|
||||
virtual void removeChild(QGIView* child);
|
||||
|
||||
virtual void addArbitraryItem(QGraphicsItem* qgi);
|
||||
virtual void switchParentItem(QGIView *targetParent);
|
||||
|
||||
// Mouse handling
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
@@ -448,9 +448,16 @@ QGIView* QGSPage::addDrawViewAnnotation(TechDraw::DrawViewAnnotation* annoFeat)
|
||||
QGIView* QGSPage::addDrawViewSymbol(TechDraw::DrawViewSymbol* symbolFeat)
|
||||
{
|
||||
auto qview(new QGIViewSymbol);
|
||||
|
||||
qview->setViewFeature(symbolFeat);
|
||||
|
||||
auto owner = dynamic_cast<TechDraw::DrawView *>(symbolFeat->Owner.getValue());
|
||||
if (owner) {
|
||||
auto parent = dynamic_cast<QGIView *>(findQViewForDocObj(owner));
|
||||
if (parent) {
|
||||
qview->switchParentItem(parent);
|
||||
}
|
||||
}
|
||||
|
||||
addQView(qview);
|
||||
return qview;
|
||||
}
|
||||
|
||||
@@ -32,10 +32,14 @@
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Mod/TechDraw/App/DrawPage.h>
|
||||
#include <Mod/TechDraw/App/DrawUtil.h>
|
||||
#include <Mod/TechDraw/App/DrawViewSymbol.h>
|
||||
|
||||
#include "QGIView.h"
|
||||
#include "ui_TaskSurfaceFinishSymbols.h"
|
||||
#include "TaskSurfaceFinishSymbols.h"
|
||||
#include "ViewProviderSymbol.h"
|
||||
#include "ZVALUE.h"
|
||||
|
||||
|
||||
using namespace Gui;
|
||||
@@ -79,16 +83,60 @@ std::string SvgString::finish()
|
||||
// TaskSurfaceFinishSymbols
|
||||
//===========================================================================
|
||||
|
||||
TaskSurfaceFinishSymbols::TaskSurfaceFinishSymbols(TechDraw::DrawViewPart* view) :
|
||||
selectedView(view),
|
||||
TaskSurfaceFinishSymbols::TaskSurfaceFinishSymbols(const std::string &ownerName) :
|
||||
ui(new Ui_TaskSurfaceFinishSymbols)
|
||||
{
|
||||
App::Document *doc = App::GetApplication().getActiveDocument();
|
||||
if (doc) {
|
||||
owner = doc->getObject(ownerName.c_str());
|
||||
std::string subName;
|
||||
if (!owner) {
|
||||
size_t dot = ownerName.rfind('.');
|
||||
if (dot != std::string::npos) {
|
||||
subName = ownerName.substr(dot + 1);
|
||||
owner = doc->getObject(ownerName.substr(0, dot).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
auto page = dynamic_cast<TechDraw::DrawPage *>(owner);
|
||||
if (page) {
|
||||
placement.x = page->getPageWidth()/2.0;
|
||||
placement.y = page->getPageHeight()/2.0;
|
||||
}
|
||||
|
||||
auto viewPart = dynamic_cast<TechDraw::DrawViewPart *>(owner);
|
||||
if (viewPart && !subName.empty()) {
|
||||
std::string subType = DrawUtil::getGeomTypeFromName(subName);
|
||||
if (subType == "Vertex") {
|
||||
TechDraw::VertexPtr vertex = viewPart->getVertex(subName);
|
||||
if (vertex) {
|
||||
placement = vertex->point();
|
||||
}
|
||||
}
|
||||
else if (subType == "Edge") {
|
||||
TechDraw::BaseGeomPtr edge = viewPart->getEdge(subName);
|
||||
if (edge) {
|
||||
placement = edge->getMidPoint();
|
||||
}
|
||||
}
|
||||
else if (subType == "Face") {
|
||||
TechDraw::FacePtr face = viewPart->getFace(subName);
|
||||
if (face) {
|
||||
placement = face->getCenter();
|
||||
}
|
||||
}
|
||||
|
||||
placement = DrawUtil::invertY(placement);
|
||||
}
|
||||
}
|
||||
|
||||
raValues = {"Ra50", "Ra25", "Ra12, 5", "Ra6, 3",
|
||||
"Ra3, 2", "Ra1, 6", "Ra0, 8", "Ra0, 4",
|
||||
"Ra0, 2", "Ra0, 1", "Ra0, 05", "Ra0, 025"};
|
||||
laySymbols = {"", "=", "⟂", "X", "M", "C", "R"};
|
||||
roughGrades = {"", "N1", "N2", "N3", "N4", "N5",
|
||||
"N6", "N7", "N8", "N9", "N10", "N11"};
|
||||
|
||||
ui->setupUi(this);
|
||||
setUiEdit();
|
||||
}
|
||||
@@ -324,8 +372,25 @@ bool TaskSurfaceFinishSymbols::accept()
|
||||
TechDraw::DrawViewSymbol *surfaceSymbol = dynamic_cast<TechDraw::DrawViewSymbol*>(docObject);
|
||||
surfaceSymbol->Symbol.setValue(completeSymbol());
|
||||
surfaceSymbol->Rotation.setValue(ui->leAngle->text().toDouble());
|
||||
TechDraw::DrawPage* page = selectedView->findParentPage();
|
||||
page->addView(surfaceSymbol);
|
||||
|
||||
auto view = dynamic_cast<TechDraw::DrawView *>(owner);
|
||||
auto page = dynamic_cast<TechDraw::DrawPage *>(owner);
|
||||
if (!page && view) {
|
||||
page = view->findParentPage();
|
||||
}
|
||||
if (page) {
|
||||
page->addView(surfaceSymbol);
|
||||
}
|
||||
|
||||
surfaceSymbol->Owner.setValue(view);
|
||||
surfaceSymbol->X.setValue(placement.x);
|
||||
surfaceSymbol->Y.setValue(placement.y);
|
||||
|
||||
auto viewProvider = dynamic_cast<ViewProviderSymbol *>(QGIView::getViewProvider(surfaceSymbol));
|
||||
if (viewProvider) {
|
||||
viewProvider->StackOrder.setValue(ZVALUE::DIMENSION);
|
||||
}
|
||||
|
||||
Gui::Command::commitCommand();
|
||||
return true;
|
||||
}
|
||||
@@ -339,10 +404,10 @@ bool TaskSurfaceFinishSymbols::reject()
|
||||
// TaskDlgSurfaceFinishSymbols//
|
||||
//===========================================================================
|
||||
|
||||
TaskDlgSurfaceFinishSymbols::TaskDlgSurfaceFinishSymbols(TechDraw::DrawViewPart* view)
|
||||
TaskDlgSurfaceFinishSymbols::TaskDlgSurfaceFinishSymbols(const std::string &ownerName)
|
||||
: TaskDialog()
|
||||
{
|
||||
widget = new TaskSurfaceFinishSymbols(view);
|
||||
widget = new TaskSurfaceFinishSymbols(ownerName);
|
||||
taskbox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("actions/TechDraw_SurfaceFinishSymbols"),
|
||||
widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
|
||||
@@ -78,7 +78,7 @@ class TaskSurfaceFinishSymbols : public QWidget
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TaskSurfaceFinishSymbols(TechDraw::DrawViewPart* view);
|
||||
explicit TaskSurfaceFinishSymbols(const std::string &ownerName);
|
||||
~TaskSurfaceFinishSymbols() override = default;
|
||||
|
||||
virtual bool accept();
|
||||
@@ -89,12 +89,14 @@ protected:
|
||||
void changeEvent(QEvent *event) override;
|
||||
void setUiEdit();
|
||||
|
||||
App::DocumentObject *owner;
|
||||
Base::Vector3d placement;
|
||||
|
||||
private:
|
||||
enum symbolType {anyMethod=0, removeProhibit, removeRequired,
|
||||
anyMethodAll, removeProhibitAll, removeRequiredAll};
|
||||
QPixmap baseSymbol(symbolType type);
|
||||
std::string completeSymbol();
|
||||
TechDraw::DrawViewPart* selectedView;
|
||||
QGraphicsScene* symbolScene; //note this is not QGSPage, but another scene only used to
|
||||
//display symbols in this task's ui
|
||||
std::vector<std::string> raValues, laySymbols, roughGrades;
|
||||
@@ -117,7 +119,7 @@ class TaskDlgSurfaceFinishSymbols : public Gui::TaskView::TaskDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TaskDlgSurfaceFinishSymbols(TechDraw::DrawViewPart* view);
|
||||
explicit TaskDlgSurfaceFinishSymbols(const std::string &ownerName);
|
||||
~TaskDlgSurfaceFinishSymbols() override;
|
||||
|
||||
/// is called the TaskView when the dialog is opened
|
||||
|
||||
@@ -442,3 +442,23 @@ TechDraw::DrawView* ViewProviderDrawingView::getViewObject() const
|
||||
{
|
||||
return dynamic_cast<TechDraw::DrawView*>(pcObject);
|
||||
}
|
||||
|
||||
void ViewProviderDrawingView::switchOwnerProperty(App::PropertyLink &prop)
|
||||
{
|
||||
QGIView *qv = getQView();
|
||||
if (!qv) {
|
||||
return;
|
||||
}
|
||||
|
||||
QGIView *targetParent = nullptr;
|
||||
auto owner = dynamic_cast<TechDraw::DrawView *>(prop.getValue());
|
||||
if (owner) {
|
||||
auto vp = dynamic_cast<ViewProviderDrawingView *>(QGIView::getViewProvider(owner));
|
||||
if (vp) {
|
||||
targetParent = vp->getQView();
|
||||
}
|
||||
}
|
||||
|
||||
qv->switchParentItem(targetParent);
|
||||
qv->updateView();
|
||||
}
|
||||
|
||||
@@ -99,6 +99,8 @@ public:
|
||||
|
||||
const char* whoAmI() const;
|
||||
|
||||
void switchOwnerProperty(App::PropertyLink &prop);
|
||||
|
||||
private:
|
||||
void multiParentPaint(std::vector<TechDraw::DrawPage*>& pages);
|
||||
void singleParentPaint(const TechDraw::DrawView* dv);
|
||||
|
||||
@@ -142,6 +142,12 @@ std::vector<App::DocumentObject*> ViewProviderLeader::claimChildren() const
|
||||
const std::vector<App::DocumentObject *> &views = getFeature()->getInList();
|
||||
try {
|
||||
for(std::vector<App::DocumentObject *>::const_iterator it = views.begin(); it != views.end(); ++it) {
|
||||
auto view = dynamic_cast<TechDraw::DrawView *>(*it);
|
||||
if (view && view->claimParent() == getViewObject()) {
|
||||
temp.push_back(view);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((*it)->isDerivedFrom<TechDraw::DrawRichAnno>()) {
|
||||
temp.push_back((*it));
|
||||
} else if ((*it)->isDerivedFrom<TechDraw::DrawWeldSymbol>()) {
|
||||
|
||||
@@ -405,6 +405,12 @@ std::vector<App::DocumentObject*> ViewProviderPage::claimChildren(void) const
|
||||
for (std::vector<App::DocumentObject*>::const_iterator it = views.begin();
|
||||
it != views.end(); ++it) {
|
||||
TechDraw::DrawView* featView = dynamic_cast<TechDraw::DrawView*>(*it);
|
||||
|
||||
// If the child view appoints a parent, skip it
|
||||
if (featView && featView->claimParent()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
App::DocumentObject* docObj = *it;
|
||||
//DrawRichAnno with no parent is child of Page
|
||||
TechDraw::DrawRichAnno* dra = dynamic_cast<TechDraw::DrawRichAnno*>(*it);
|
||||
|
||||
@@ -44,15 +44,17 @@ ViewProviderSymbol::~ViewProviderSymbol()
|
||||
|
||||
void ViewProviderSymbol::updateData(const App::Property* prop)
|
||||
{
|
||||
if (prop == &getViewObject()->Scale) {
|
||||
onGuiRepaint(getViewObject());
|
||||
} else if (prop == &getViewObject()->Rotation) {
|
||||
onGuiRepaint(getViewObject());
|
||||
} else if (prop == &getViewObject()->Symbol) {
|
||||
onGuiRepaint(getViewObject());
|
||||
} else if (prop == &getViewObject()->EditableTexts) {
|
||||
onGuiRepaint(getViewObject());
|
||||
TechDraw::DrawViewSymbol *obj = getViewObject();
|
||||
if (prop == &obj->Scale
|
||||
|| prop == &obj->Rotation
|
||||
|| prop == &obj->Symbol
|
||||
|| prop == &obj->EditableTexts) {
|
||||
onGuiRepaint(obj);
|
||||
}
|
||||
else if (prop == &obj->Owner) {
|
||||
switchOwnerProperty(obj->Owner);
|
||||
}
|
||||
|
||||
ViewProviderDrawingView::updateData(prop);
|
||||
}
|
||||
|
||||
|
||||
@@ -217,6 +217,12 @@ std::vector<App::DocumentObject*> ViewProviderViewPart::claimChildren() const
|
||||
const std::vector<App::DocumentObject *> &views = getViewPart()->getInList();
|
||||
try {
|
||||
for(std::vector<App::DocumentObject *>::const_iterator it = views.begin(); it != views.end(); ++it) {
|
||||
auto view = dynamic_cast<TechDraw::DrawView *>(*it);
|
||||
if (view && view->claimParent() == getViewPart()) {
|
||||
temp.push_back(view);
|
||||
continue;
|
||||
}
|
||||
|
||||
if((*it)->isDerivedFrom<TechDraw::DrawViewDimension>()) {
|
||||
//TODO: make a list, then prune it. should be faster?
|
||||
bool skip = false;
|
||||
|
||||
Reference in New Issue
Block a user