Extend python interface for groups and fix test cases

This commit is contained in:
Stefan Tröger
2017-02-12 09:01:22 +01:00
committed by wmayer
parent e5c1f2bc70
commit 1d10dd2835
8 changed files with 178 additions and 105 deletions

View File

@@ -40,6 +40,7 @@
#include "PropertyLinks.h"
#include "GeoFeatureGroupExtension.h"
#include "OriginFeature.h"
using namespace App;
using namespace Base;
@@ -88,6 +89,14 @@ void ensureCorrectGroups(PropertyContainer* container, App::DocumentObject* obje
if(!container->isDerivedFrom(App::DocumentObject::getClassTypeId()))
return;
//links to origin feature can go over CS borders, as they are the same everywere anyway. This is
//a workaround to allow moving of objects between GeoFeatureGroups that link to origin features.
//During movement there is always a link in to the wron CS and the error would occure. If we
//surpress the error at least the origin links can be fixed afterwards
//TODO: Find a more elegant solution
if(object->isDerivedFrom(App::OriginFeature::getClassTypeId()))
return;
//undo and redo do not need to be handled as they can only go to already checked stated (the link
//state during those actions can get messed up, we really don't want to check for that)
if(object->getDocument()->performsTransactionOperation())