LinkScope clean up

This commit is contained in:
WandererFan
2017-12-18 10:21:36 -05:00
committed by wmayer
parent 309178f2ff
commit d9b71fb754
10 changed files with 13 additions and 7 deletions

View File

@@ -65,6 +65,7 @@ TYPESYSTEM_SOURCE(Measure::Measurement, Base::BaseClass)
Measurement::Measurement()
{
measureType = Invalid;
References3D.setScope(App::LinkScope::Global);
}
Measurement::~Measurement()
@@ -229,6 +230,7 @@ TopoDS_Shape Measurement::getShape(App::DocumentObject *obj , const char *subNam
}
}
//TODO:: add lengthX, lengthY (and lengthZ??) support
// Methods for distances (edge length, two points, edge and a point
double Measurement::length() const
{

View File

@@ -48,7 +48,7 @@ class MeasureExport Measurement : public Base::BaseClass {
TYPESYSTEM_HEADER();
public:
App::PropertyLinkSubListGlobal References3D;
App::PropertyLinkSubList References3D;
public:
Measurement();

View File

@@ -55,6 +55,7 @@ DrawViewArch::DrawViewArch(void)
static const char *group = "Arch view";
ADD_PROPERTY_TYPE(Source ,(0),group,App::Prop_None,"Section Plane object for this view");
Source.setScope(App::LinkScope::Global);
ADD_PROPERTY_TYPE(AllOn ,(false),group,App::Prop_None,"If hidden objects must be shown or not");
RenderMode.setEnums(RenderModeEnums);
ADD_PROPERTY_TYPE(RenderMode, ((long)0),group,App::Prop_None,"The render mode to use");

View File

@@ -42,7 +42,7 @@ public:
DrawViewArch(void);
virtual ~DrawViewArch();
App::PropertyLinkGlobal Source;
App::PropertyLink Source;
App::PropertyBool AllOn;
App::PropertyEnumeration RenderMode; // "Wireframe","Solid"
App::PropertyBool ShowHidden;

View File

@@ -95,7 +95,9 @@ DrawViewDimension::DrawViewDimension(void)
double fontSize = hGrp->GetFloat("FontSize", 3.5);
ADD_PROPERTY_TYPE(References2D,(0,0),"",(App::PropertyType)(App::Prop_None),"Projected Geometry References");
References2D.setScope(App::LinkScope::Global);
ADD_PROPERTY_TYPE(References3D,(0,0),"",(App::PropertyType)(App::Prop_None),"3D Geometry References");
References3D.setScope(App::LinkScope::Global);
ADD_PROPERTY_TYPE(Font ,(fontName.c_str()),"Format",App::Prop_None, "The name of the font to use");
ADD_PROPERTY_TYPE(Fontsize,(fontSize) ,"Format",(App::PropertyType)(App::Prop_None),"Dimension text size in mm");
ADD_PROPERTY_TYPE(FormatSpec,(getDefaultFormatSpec().c_str()) ,

View File

@@ -55,7 +55,7 @@ public:
App::PropertyEnumeration MeasureType; //True/Projected
App::PropertyLinkSubList References2D; //Points to Projection SubFeatures
App::PropertyLinkSubListGlobal References3D; //Points to 3D Geometry SubFeatures
App::PropertyLinkSubList References3D; //Points to 3D Geometry SubFeatures
App::PropertyEnumeration Type; //DistanceX,DistanceY,Diameter, etc
/// Properties for Visualisation

View File

@@ -52,6 +52,7 @@ DrawViewDraft::DrawViewDraft(void)
static const char *group = "Draft view";
ADD_PROPERTY_TYPE(Source ,(0),group,App::Prop_None,"Draft object for this view");
Source.setScope(App::LinkScope::Global);
ADD_PROPERTY_TYPE(LineWidth,(0.35),group,App::Prop_None,"Line width of this view");
ADD_PROPERTY_TYPE(FontSize,(12.0),group,App::Prop_None,"Text size for this view");
ADD_PROPERTY_TYPE(Direction ,(0,0,1.0),group,App::Prop_None,"Projection direction. The direction you are looking from.");

View File

@@ -43,7 +43,7 @@ public:
DrawViewDraft(void);
virtual ~DrawViewDraft();
App::PropertyLinkGlobal Source;
App::PropertyLink Source;
App::PropertyFloat LineWidth;
App::PropertyFloat FontSize;
App::PropertyVector Direction;

View File

@@ -80,7 +80,7 @@ DrawViewMulti::DrawViewMulti()
//properties that affect Geometry
ADD_PROPERTY_TYPE(Sources ,(0),group,App::Prop_None,"3D Shapes to view");
Sources.setScope(App::LinkScope::Global);
//Source is replaced by Sources in Multi
Source.setStatus(App::Property::ReadOnly,true);
Source.setStatus(App::Property::Hidden,true);

View File

@@ -56,8 +56,8 @@ public:
/// Constructor
DrawViewMulti(void);
virtual ~DrawViewMulti();
App::PropertyLinkListGlobal Sources;
App::PropertyLinkList Sources;
virtual short mustExecute() const override;
/** @name methods override Feature */