+ fixes #0000711: fileted borders not projected on 2D drawing + deleted views still showing

This commit is contained in:
wmayer 2014-12-26 22:24:45 +01:00
parent d060cdf400
commit 9290274e1c
2 changed files with 20 additions and 1 deletions

View File

@ -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);
}

View File

@ -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;
};