Restore secondary ortho view movement to v017 style

- this should also complete the fix for #3809
This commit is contained in:
wandererfan
2019-02-08 19:42:23 -05:00
committed by wmayer
parent 2240ba0e2a
commit 9de6ff802a
10 changed files with 100 additions and 76 deletions

View File

@@ -96,7 +96,6 @@ void DrawProjGroup::onChanged(const App::Property* prop)
if (!sourceObjs.empty()) {
if (!hasAnchor()) {
// if we have a Source, but no Anchor, make an anchor
// Base::Console().Message("TRACE - DPG::onChanged - adding Front\n");
Anchor.setValue(addProjection("Front"));
Anchor.purgeTouched(); //don't need to mark this
}
@@ -133,7 +132,6 @@ void DrawProjGroup::onChanged(const App::Property* prop)
Base::Console().Warning("DPG: Projection Groups do not rotate. Change ignored.\n");
}
}
}
TechDraw::DrawViewCollection::onChanged(prop);
@@ -141,6 +139,7 @@ void DrawProjGroup::onChanged(const App::Property* prop)
App::DocumentObjectExecReturn *DrawProjGroup::execute(void)
{
// Base::Console().Message("DPG::execute()\n");
if (!keepUpdated()) {
return App::DocumentObject::StdReturn;
}
@@ -183,6 +182,7 @@ short DrawProjGroup::mustExecute() const
ProjectionType.isTouched() ||
Anchor.isTouched() ||
AutoDistribute.isTouched() ||
LockPosition.isTouched()||
spacingX.isTouched() ||
spacingY.isTouched();
}
@@ -324,7 +324,6 @@ DrawProjGroupItem* DrawProjGroup::getProjItem(const char *viewProjType) const
return result;
}
bool DrawProjGroup::checkViewProjType(const char *in)
{
if ( strcmp(in, "Front") == 0 ||
@@ -379,12 +378,13 @@ App::DocumentObject * DrawProjGroup::addProjection(const char *viewProjType)
} else { //Front
view->LockPosition.setValue(true); //lock "Front" position within DPG (note not Page!).
view->LockPosition.setStatus(App::Property::ReadOnly,true); //Front should stay locked.
App::GetApplication().signalChangePropertyEditor(view->LockPosition);
view->LockPosition.purgeTouched();
requestPaint();
}
addView(view); //from DrawViewCollection
if (view != getAnchor()) { //anchor is done elsewhere
view->recomputeFeature();
}
requestPaint();
}
return view;
@@ -521,7 +521,8 @@ Base::Vector3d DrawProjGroup::getXYPosition(const char *viewTypeCStr)
//TODO: bounding boxes do not take view orientation into account
// ie X&Y widths might be swapped on page
if (AutoDistribute.getValue()) {
// if (AutoDistribute.getValue()) {
if (true) {
std::vector<Base::Vector3d> position(idxCount);
int idx = 0;
for (;idx < idxCount; idx++) {
@@ -627,7 +628,6 @@ Base::Vector3d DrawProjGroup::getXYPosition(const char *viewTypeCStr)
return result;
}
int DrawProjGroup::getViewIndex(const char *viewTypeCStr) const
{
int result = 4; //default to front view's position
@@ -848,7 +848,6 @@ TechDraw::DrawProjGroupItem* DrawProjGroup::getAnchor(void)
return result;
}
void DrawProjGroup::setAnchorDirection(const Base::Vector3d dir)
{
App::DocumentObject* docObj = Anchor.getValue();
@@ -869,7 +868,6 @@ Base::Vector3d DrawProjGroup::getAnchorDirection(void)
return result;
}
//*************************************
//* view direction manipulation routines
//*************************************