[TD]Revert property type changes

This commit is contained in:
wandererfan
2025-07-04 13:30:18 -04:00
committed by Chris Hennes
parent 0ad55281ad
commit 3dc2f7b3e9
6 changed files with 20 additions and 20 deletions

View File

@@ -482,8 +482,8 @@ bool DrawViewDetail::debugDetail() const
void DrawViewDetail::handleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, App::Property * prop)
{
if (prop == &AnchorPoint) {
// AnchorPoint was PropertyVector but is now PropertyPosition
App::PropertyVector tmp;
// AnchorPoint was PropertyVector, then briefly PropertyPosition, now back to PropertyVector
App::PropertyPosition tmp;
if (strcmp(tmp.getTypeId().getName(), TypeName)==0) {
tmp.setContainer(this);
tmp.Restore(reader);
@@ -494,7 +494,7 @@ void DrawViewDetail::handleChangedPropertyType(Base::XMLReader &reader, const ch
}
if (prop == &Radius) {
// Radius was PropertyFloat but is now PropertyLength
// Radius was PropertyFloat, then briefly PropertyLength, now back to PropertyFloat
App::PropertyLength tmp;
if (strcmp(tmp.getTypeId().getName(), TypeName)==0) {
tmp.setContainer(this);

View File

@@ -57,8 +57,8 @@ public:
~DrawViewDetail() override;
App::PropertyLink BaseView;
App::PropertyPosition AnchorPoint;
App::PropertyLength Radius;
App::PropertyVector AnchorPoint;
App::PropertyFloat Radius;
App::PropertyString Reference;
App::PropertyBool ShowMatting;

View File

@@ -1516,8 +1516,8 @@ void DrawViewPart::resetReferenceVerts()
void DrawViewPart::handleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, App::Property * prop)
{
if (prop == &Direction) {
// Direction was PropertyVector but is now PropertyDirection
App::PropertyVector tmp;
// Direction was PropertyVector, then briefly PropertyDirection, now back to PropertyVector
App::PropertyDirection tmp;
if (strcmp(tmp.getTypeId().getName(), TypeName)==0) {
tmp.setContainer(this);
tmp.Restore(reader);
@@ -1528,8 +1528,8 @@ void DrawViewPart::handleChangedPropertyType(Base::XMLReader &reader, const char
}
if (prop == &XDirection) {
// XDirection was PropertyFloat but is now PropertyLength
App::PropertyVector tmp;
// XDirection was PropertyVector, then briefly PropertyDirection, now back to PropertyVector
App::PropertyDirection tmp;
if (strcmp(tmp.getTypeId().getName(), TypeName)==0) {
tmp.setContainer(this);
tmp.Restore(reader);

View File

@@ -115,8 +115,8 @@ public:
App::PropertyLinkList Source;
App::PropertyXLinkList XSource;
App::PropertyDirection Direction; // the projection direction
App::PropertyDirection XDirection;
App::PropertyVector Direction; // the projection direction. where you are looking from.
App::PropertyVector XDirection;
App::PropertyBool Perspective;
App::PropertyDistance Focus;

View File

@@ -164,7 +164,7 @@ DrawViewSection::DrawViewSection()
"2D View source for this Section");
BaseView.setScope(App::LinkScope::Global);
// default of (0, -1, 0) matches 'Front' direction in DVP
// default of (0, -1, 0) matches default 'Front' direction in DVP
ADD_PROPERTY_TYPE(SectionNormal,
(0, -1, 0),
sgroup,
@@ -182,6 +182,8 @@ DrawViewSection::DrawViewSection()
sgroup,
App::Prop_None,
"Orientation of this Section in the Base View");
SectionDirection.setStatus(App::Property::Hidden, true);
SectionDirection.setStatus(App::Property::ReadOnly, true);
// properties related to the cut operation
ADD_PROPERTY_TYPE(FuseBeforeCut,
@@ -259,8 +261,6 @@ DrawViewSection::DrawViewSection()
Direction.setStatus(App::Property::ReadOnly, true);
Direction.setValue(SectionNormal.getValue());
SectionDirection.setStatus(App::Property::Hidden, true);
SectionDirection.setStatus(App::Property::ReadOnly, true);
}
DrawViewSection::~DrawViewSection()
@@ -1231,8 +1231,8 @@ void DrawViewSection::setupObject()
void DrawViewSection::handleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, App::Property * prop)
{
if (prop == &SectionOrigin) {
// SectionOrigin was PropertyVector but is now PropertyPosition
App::PropertyVector tmp;
// SectionOrigin was PropertyVector then briefly PropertyPosition, now back to PropertyVector
App::PropertyPosition tmp;
if (strcmp(tmp.getTypeId().getName(), TypeName)==0) {
tmp.setContainer(this);
tmp.Restore(reader);
@@ -1243,8 +1243,8 @@ void DrawViewSection::handleChangedPropertyType(Base::XMLReader &reader, const c
}
if (prop == &SectionNormal) {
// Radius was PropertyVector but is now PropertyDirection
App::PropertyVector tmp;
// Radius was PropertyVector, then briefly PropertyDirection, then PropertyVector
App::PropertyDirection tmp;
if (strcmp(tmp.getTypeId().getName(), TypeName)==0) {
tmp.setContainer(this);
tmp.Restore(reader);

View File

@@ -87,8 +87,8 @@ public:
//NOLINTBEGIN
App::PropertyLink BaseView;
App::PropertyDirection SectionNormal;
App::PropertyPosition SectionOrigin;
App::PropertyVector SectionNormal;
App::PropertyVector SectionOrigin;
App::PropertyString SectionSymbol;