[TD]Landmark Dims initial impl
This commit is contained in:
@@ -66,6 +66,7 @@
|
||||
#include <Mod/TechDraw/App/DrawViewCollection.h>
|
||||
#include <Mod/TechDraw/App/DrawViewBalloon.h>
|
||||
#include <Mod/TechDraw/App/DrawViewDimension.h>
|
||||
//#include <Mod/TechDraw/App/LandmarkDimension.h>
|
||||
#include <Mod/TechDraw/App/DrawProjGroup.h>
|
||||
#include <Mod/TechDraw/App/DrawViewPart.h>
|
||||
#include <Mod/TechDraw/App/DrawViewAnnotation.h>
|
||||
@@ -490,6 +491,7 @@ QGIView * QGVPage::addViewDimension(TechDraw::DrawViewDimension *dim)
|
||||
|
||||
void QGVPage::addDimToParent(QGIViewDimension* dim, QGIView* parent)
|
||||
{
|
||||
// Base::Console().Message("QGVP::addDimToParent()\n");
|
||||
assert(dim);
|
||||
assert(parent); //blow up if we don't have Dimension or Parent
|
||||
QPointF posRef(0.,0.);
|
||||
@@ -617,10 +619,21 @@ QGIView * QGVPage::findParent(QGIView *view) const
|
||||
const std::vector<QGIView *> qviews = getViews();
|
||||
TechDraw::DrawView *myFeat = view->getViewObject();
|
||||
|
||||
//LandmarkDimension shouldn't require special handling
|
||||
// TechDraw::LandmarkDimension *robust = nullptr;
|
||||
// robust = dynamic_cast<TechDraw::LandmarkDimension*>(myFeat);
|
||||
// if (robust != nullptr) {
|
||||
// App::DocumentObject* robustParent = robust->ParentView.getValue();
|
||||
// for (auto& qv: qviews) {
|
||||
// if(strcmp(qv->getViewName(), robustParent->getNameInDocument()) == 0) {
|
||||
// return qv;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
//If type is dimension we check references first
|
||||
TechDraw::DrawViewDimension *dim = 0;
|
||||
dim = dynamic_cast<TechDraw::DrawViewDimension *>(myFeat);
|
||||
|
||||
if(dim) {
|
||||
std::vector<App::DocumentObject *> objs = dim->References2D.getValues();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user