Filter out AddShape property in PartDesign view provider

This commit is contained in:
wmayer 2012-02-23 11:06:26 +01:00
parent 54b5a0aad7
commit 68c9d5e0fb
2 changed files with 13 additions and 5 deletions

View File

@ -27,6 +27,7 @@
#endif
#include "ViewProvider.h"
#include <Mod/Part/App/PropertyTopoShape.h>
#include <Gui/Command.h>
//#include <Gui/Document.h>
@ -51,4 +52,11 @@ bool ViewProvider::doubleClicked(void)
return true;
}
void ViewProvider::updateData(const App::Property* prop)
{
if (prop->getTypeId() == Part::PropertyPartShape::getClassTypeId() &&
strcmp(prop->getName(),"AddShape") == 0) {
return;
}
inherited::updateData(prop);
}

View File

@ -29,9 +29,9 @@
namespace PartDesignGui {
class PartDesignGuiExport ViewProvider : public PartGui::ViewProviderPart
{
PROPERTY_HEADER(PartGui::ViewProvider);
class PartDesignGuiExport ViewProvider : public PartGui::ViewProviderPart {
typedef PartGui::ViewProviderPart inherited;
PROPERTY_HEADER(PartDesignGui::ViewProvider);
public:
/// constructor
@ -40,7 +40,7 @@ public:
virtual ~ViewProvider();
virtual bool doubleClicked(void);
void updateData(const App::Property*);
};