+ introduce proper enum for property status to replace plain integers
This commit is contained in:
@@ -64,8 +64,8 @@ ViewProviderDrawingPage::ViewProviderDrawingPage()
|
||||
ADD_PROPERTY(HintOffsetY,(10.0));
|
||||
|
||||
// do not show this in the property editor
|
||||
Visibility.StatusBits.set(3, true);
|
||||
DisplayMode.StatusBits.set(3, true);
|
||||
Visibility.setStatus(App::Property::Hidden, true);
|
||||
DisplayMode.setStatus(App::Property::Hidden, true);
|
||||
}
|
||||
|
||||
ViewProviderDrawingPage::~ViewProviderDrawingPage()
|
||||
|
||||
@@ -50,7 +50,7 @@ ViewProviderDrawingView::ViewProviderDrawingView()
|
||||
sPixmap = "Page";
|
||||
|
||||
// Do not show in property editor
|
||||
DisplayMode.StatusBits.set(3, true);
|
||||
DisplayMode.setStatus(App::Property::Hidden, true);
|
||||
}
|
||||
|
||||
ViewProviderDrawingView::~ViewProviderDrawingView()
|
||||
@@ -148,7 +148,7 @@ ViewProviderDrawingClip::ViewProviderDrawingClip()
|
||||
sPixmap = "Page";
|
||||
|
||||
// Do not show in property editor
|
||||
DisplayMode.StatusBits.set(3, true);
|
||||
DisplayMode.setStatus(App::Property::Hidden, true);
|
||||
}
|
||||
|
||||
ViewProviderDrawingClip::~ViewProviderDrawingClip()
|
||||
|
||||
@@ -47,12 +47,12 @@ FemResultObject::FemResultObject()
|
||||
ADD_PROPERTY_TYPE(EigenmodeFrequency,(0), "Fem",Prop_None,"Frequency of the eigenmode");
|
||||
|
||||
// make read-only for property editor
|
||||
NodeNumbers.StatusBits.set(2, true);
|
||||
DisplacementVectors.StatusBits.set(2, true);
|
||||
DisplacementLengths.StatusBits.set(2, true);
|
||||
StressValues.StatusBits.set(2, true);
|
||||
Eigenmode.StatusBits.set(2, true);
|
||||
EigenmodeFrequency.StatusBits.set(2, true);
|
||||
NodeNumbers.setStatus(App::Property::ReadOnly, true);
|
||||
DisplacementVectors.setStatus(App::Property::ReadOnly, true);
|
||||
DisplacementLengths.setStatus(App::Property::ReadOnly, true);
|
||||
StressValues.setStatus(App::Property::ReadOnly, true);
|
||||
Eigenmode.setStatus(App::Property::ReadOnly, true);
|
||||
EigenmodeFrequency.setStatus(App::Property::ReadOnly, true);
|
||||
}
|
||||
|
||||
FemResultObject::~FemResultObject()
|
||||
|
||||
@@ -178,7 +178,7 @@ void Box::Restore(Base::XMLReader &reader)
|
||||
if (location_xyz) {
|
||||
plm.setPosition(Base::Vector3d(x.getValue(),y.getValue(),z.getValue()));
|
||||
this->Placement.setValue(this->Placement.getValue() * plm);
|
||||
this->Shape.StatusBits.set(10); // override the shape's location later on
|
||||
this->Shape.setStatus(App::Property::User1, true); // override the shape's location later on
|
||||
}
|
||||
// for 0.8 releases
|
||||
else if (location_axis) {
|
||||
@@ -189,7 +189,7 @@ void Box::Restore(Base::XMLReader &reader)
|
||||
plm.setRotation(rot);
|
||||
plm.setPosition(Base::Vector3d(p.x,p.y,p.z));
|
||||
this->Placement.setValue(this->Placement.getValue() * plm);
|
||||
this->Shape.StatusBits.set(10); // override the shape's location later on
|
||||
this->Shape.setStatus(App::Property::User1, true); // override the shape's location later on
|
||||
}
|
||||
|
||||
reader.readEndElement("Properties");
|
||||
@@ -205,8 +205,8 @@ void Box::onChanged(const App::Property* prop)
|
||||
}
|
||||
else if (prop == &this->Shape) {
|
||||
// see Box::Restore
|
||||
if (this->Shape.StatusBits.test(10)) {
|
||||
this->Shape.StatusBits.reset(10);
|
||||
if (this->Shape.testStatus(App::Property::User1)) {
|
||||
this->Shape.setStatus(App::Property::User1, false);
|
||||
App::DocumentObjectExecReturn *ret = recompute();
|
||||
delete ret;
|
||||
return;
|
||||
|
||||
@@ -60,7 +60,7 @@ void DressUp::onChanged(const App::Property* prop)
|
||||
{
|
||||
if (prop == &Base) {
|
||||
// if attached to a sketch then mark it as read-only
|
||||
this->Placement.StatusBits.set(2, Base.getValue() != 0);
|
||||
this->Placement.setStatus(App::Property::ReadOnly, Base.getValue() != 0);
|
||||
}
|
||||
|
||||
Feature::onChanged(prop);
|
||||
|
||||
@@ -243,7 +243,7 @@ void SketchBased::onChanged(const App::Property* prop)
|
||||
{
|
||||
if (prop == &Sketch) {
|
||||
// if attached to a sketch then mark it as read-only
|
||||
this->Placement.StatusBits.set(2, Sketch.getValue() != 0);
|
||||
this->Placement.setStatus(App::Property::ReadOnly, Sketch.getValue() != 0);
|
||||
}
|
||||
|
||||
Feature::onChanged(prop);
|
||||
|
||||
@@ -60,7 +60,7 @@ Transformed::Transformed() : rejected(0)
|
||||
{
|
||||
ADD_PROPERTY(Originals,(0));
|
||||
Originals.setSize(0);
|
||||
Placement.StatusBits.set(2, true);
|
||||
Placement.setStatus(App::Property::ReadOnly, true);
|
||||
}
|
||||
|
||||
void Transformed::positionBySupport(void)
|
||||
|
||||
@@ -70,8 +70,8 @@ ViewFeature::ViewFeature()
|
||||
ADD_PROPERTY_TYPE(Height,(0), "View", type, "The height of the point view");
|
||||
ADD_PROPERTY_TYPE(Direction ,(Base::Vector3d(0,0,1)), "View", type, "The direction of the point view");
|
||||
|
||||
Width.StatusBits.set(2, true);
|
||||
Height.StatusBits.set(2, true);
|
||||
Width.setStatus(App::Property::ReadOnly, true);
|
||||
Height.setStatus(App::Property::ReadOnly, true);
|
||||
}
|
||||
|
||||
ViewFeature::~ViewFeature()
|
||||
|
||||
Reference in New Issue
Block a user