+ fixes #0000711: fileted borders not projected on 2D drawing + deleted views still showing
This commit is contained in:
@@ -52,7 +52,7 @@ PROPERTY_SOURCE(Drawing::FeaturePage, App::DocumentObjectGroup)
|
||||
|
||||
const char *group = "Drawing view";
|
||||
|
||||
FeaturePage::FeaturePage(void)
|
||||
FeaturePage::FeaturePage(void) : numChildren(0)
|
||||
{
|
||||
static const char *group = "Drawing view";
|
||||
|
||||
@@ -65,6 +65,15 @@ FeaturePage::~FeaturePage()
|
||||
{
|
||||
}
|
||||
|
||||
void FeaturePage::onBeforeChange(const App::Property* prop)
|
||||
{
|
||||
if (prop == &Group) {
|
||||
numChildren = Group.getSize();
|
||||
}
|
||||
|
||||
App::DocumentObjectGroup::onBeforeChange(prop);
|
||||
}
|
||||
|
||||
/// get called by the container when a Property was changed
|
||||
void FeaturePage::onChanged(const App::Property* prop)
|
||||
{
|
||||
@@ -85,7 +94,13 @@ void FeaturePage::onChanged(const App::Property* prop)
|
||||
if (!this->isRestoring()) {
|
||||
EditableTexts.setValues(getEditableTextsFromTemplate());
|
||||
}
|
||||
} else if (prop == &Group) {
|
||||
if (Group.getSize() != numChildren) {
|
||||
numChildren = Group.getSize();
|
||||
touch();
|
||||
}
|
||||
}
|
||||
|
||||
App::DocumentObjectGroup::onChanged(prop);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,11 @@ public:
|
||||
virtual std::vector<std::string> getEditableTextsFromTemplate(void) const;
|
||||
|
||||
protected:
|
||||
void onBeforeChange(const App::Property* prop);
|
||||
void onChanged(const App::Property* prop);
|
||||
|
||||
private:
|
||||
int numChildren;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user