Hide n/a Rotation property

- DPG does not rotate, but shows Rotation property in
  Property Editor
This commit is contained in:
wandererfan
2019-01-29 16:58:26 -05:00
committed by Yorik van Havre
parent 2e4a1f1e19
commit f92ddb961c
3 changed files with 18 additions and 1 deletions

View File

@@ -70,13 +70,15 @@ DrawProjGroup::DrawProjGroup(void)
ADD_PROPERTY_TYPE(Source ,(0), group, App::Prop_None,"Shape to view");
Source.setScope(App::LinkScope::Global);
ADD_PROPERTY_TYPE(Anchor, (0), group, App::Prop_None, "The root view to align projections with");
Anchor.setScope(App::LinkScope::Global);
Anchor.setScope(App::LinkScope::Global);
ProjectionType.setEnums(ProjectionTypeEnums);
ADD_PROPERTY(ProjectionType, ((long)0));
ADD_PROPERTY_TYPE(AutoDistribute ,(autoDist),agroup,App::Prop_None,"Distribute Views Automatically or Manually");
ADD_PROPERTY_TYPE(spacingX, (15), agroup, App::Prop_None, "Horizontal spacing between views");
ADD_PROPERTY_TYPE(spacingY, (15), agroup, App::Prop_None, "Vertical spacing between views");
Rotation.setStatus(App::Property::Hidden,true); //DPG does not rotate
}
DrawProjGroup::~DrawProjGroup()
@@ -125,6 +127,13 @@ void DrawProjGroup::onChanged(const App::Property* prop)
}
}
}
if (prop == &Rotation) {
if (!DrawUtil::fpCompare(Rotation.getValue(),0.0)) {
Rotation.setValue(0.0);
purgeTouched();
Base::Console().Warning("DPG: Projection Groups do not rotate. Change ignored.\n");
}
}
}

View File

@@ -213,6 +213,12 @@ void QGIProjGroup::updateView(bool update)
return QGIViewCollection::updateView(update);
}
//QGIPG does not rotate. Only individual views rotate
void QGIProjGroup::rotateView(void)
{
Base::Console().Warning("QGIPG: Projection Groups do not rotate. Change ignored\n");
}
void QGIProjGroup::drawBorder()
{
//QGIProjGroup does not have a border!

View File

@@ -51,6 +51,8 @@ public:
void alignTo(QGIProjGroup *, const QString &alignment);
virtual void updateView(bool update = false);
virtual void rotateView(void) override;
virtual void drawBorder(void);
protected: