Warn if Anchor view deleted in Projection Group

This commit is contained in:
WandererFan
2017-01-06 09:36:03 -05:00
parent af4bedf441
commit 221f80e344
3 changed files with 19 additions and 5 deletions

View File

@@ -496,6 +496,11 @@ int DrawProjGroup::removeProjection(const char *viewProjType)
auto projPtr( dynamic_cast<TechDraw::DrawProjGroupItem *>(it) );
if( projPtr ) {
if ( strcmp(viewProjType, projPtr->Type.getValueAsString()) == 0 ) {
if( strcmp(viewProjType,"Front") == 0 ) {
Base::Console().Warning("DPG - %s: Front projection deleted. Projection group may be corrupt\n",
getNameInDocument());
Anchor.setValue(nullptr);
}
removeView(projPtr); // Remove from collection
getDocument()->remObject( it->getNameInDocument() ); // Remove from the document
moveToCentre();