Skip to content

Commit

Permalink
+ fixes #711: fileted borders not projected on 2D drawing + deleted v…
Browse files Browse the repository at this point in the history
…iews still showing
  • Loading branch information
wwmayer committed Dec 26, 2014
1 parent d060cdf commit 9290274
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/Mod/Drawing/App/FeaturePage.cpp
Expand Up @@ -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";

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

Expand Down
4 changes: 4 additions & 0 deletions src/Mod/Drawing/App/FeaturePage.h
Expand Up @@ -62,7 +62,11 @@ class DrawingExport FeaturePage: public App::DocumentObjectGroup
virtual std::vector<std::string> getEditableTextsFromTemplate(void) const;

protected:
void onBeforeChange(const App::Property* prop);
void onChanged(const App::Property* prop);

private:
int numChildren;
};


Expand Down

0 comments on commit 9290274

Please sign in to comment.